| Summary: | Impact of PreviewEnabled check in DOM on JDT UI | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Sarika Sinha <sarika.sinha> |
| Component: | UI | Assignee: | Noopur Gupta <noopur_gupta> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, kalyan_prasad, loskutov, noopur_gupta |
| Version: | 4.13 | ||
| Target Milestone: | 4.13 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/146852 https://git.eclipse.org/r/147173 https://git.eclipse.org/r/147172 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=2dd58e630eefa755033abef13e0afbc6ed5d6d06 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=1fe269b376f145e7bd8624d45acde60649c700d1 |
||
| Whiteboard: | |||
| Bug Depends on: | 549106 | ||
| Bug Blocks: | 550137 | ||
|
Description
Sarika Sinha
Test suites to run: org.eclipse.jdt.ui.tests.AutomatedSuite and org.eclipse.jdt.ui.tests.refactoring.all.AllAllRefactoringTests. Currently showing 39 errors and 4 failures in the first one, and 6 errors in the second one. One change that's required is to add ast.isPreviewEnabled() check wherever JLS12 preview APIs are being used. (In reply to Noopur Gupta from comment #1) > One change that's required is to add ast.isPreviewEnabled() check wherever > JLS12 preview APIs are being used. After these changes, getting missing 'break' issue e.g. in org.eclipse.jdt.ui.tests.quickfix.LocalCorrectionsQuickFixTest.testSwitchCaseFallThrough1(). New Gerrit change created: https://git.eclipse.org/r/146852 (In reply to Eclipse Genie from comment #3) > New Gerrit change created: https://git.eclipse.org/r/146852 With patch set 5 of JDT Core patch and the above JDT UI Gerrit, the following issues remain: - Getting 'MISSING' from AST rewrite in tests like AdvancedQuickAssistTest17.testConvertIfToSwitch() - QuickFixTest12.testEnablePreviewsAndOpenCompilerPropertiesProposals() failing: As discussed with Sarika, this may need a change in compiler first so should check the test case after that. Also, once changes are finalized, based on bug 549106#c6, org.eclipse.jdt.internal.corext.dom.ASTFlattener.visit(BreakStatement) should be updated. (In reply to Noopur Gupta from comment #4) > - QuickFixTest12.testEnablePreviewsAndOpenCompilerPropertiesProposals() > failing: As discussed with Sarika, this may need a change in compiler first > so should check the test case after that. This is now failing in the I-build also (I20190806-1800). (In reply to Noopur Gupta from comment #6) > (In reply to Noopur Gupta from comment #4) > > - QuickFixTest12.testEnablePreviewsAndOpenCompilerPropertiesProposals() > > failing: As discussed with Sarika, this may need a change in compiler first > > so should check the test case after that. > > This is now failing in the I-build also (I20190806-1800). Handled in bug 548476 comment #24. (In reply to Noopur Gupta from comment #4) > (In reply to Eclipse Genie from comment #3) > > New Gerrit change created: https://git.eclipse.org/r/146852 > > With patch set 5 of JDT Core patch and the above JDT UI Gerrit, the > following issues remain: > > - Getting 'MISSING' from AST rewrite in tests like > AdvancedQuickAssistTest17.testConvertIfToSwitch() Updated the patch. All relevant tests pass now. comment #7 will be handled by the corresponding bug. New Gerrit change created: https://git.eclipse.org/r/147173 New Gerrit change created: https://git.eclipse.org/r/147172 (In reply to Eclipse Genie from comment #9) > New Gerrit change created: https://git.eclipse.org/r/147173 (In reply to Noopur Gupta from comment #5) > Also, once changes are finalized, based on bug 549106#c6, > org.eclipse.jdt.internal.corext.dom.ASTFlattener.visit(BreakStatement) > should be updated. Done. Gerrit change https://git.eclipse.org/r/146852 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=2dd58e630eefa755033abef13e0afbc6ed5d6d06 Gerrit change https://git.eclipse.org/r/147173 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=1fe269b376f145e7bd8624d45acde60649c700d1 Changes have been released. To be verified in the next I-build. (In reply to Noopur Gupta from comment #14) > Changes have been released. To be verified in the next I-build. Unfortunately still fails on all platforms: https://download.eclipse.org/eclipse/downloads/drops4/I20190807-1800/testresults/html/org.eclipse.jdt.ui.tests_ep413I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html testEnablePreviewsAndOpenCompilerPropertiesProposals Wrong number of problems, is: 7, expected: 3 Pb(1103) Switch Expressions is a preview feature and disabled by default. Use --enable-preview to enable[82 ,404] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[97 ,117] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[97 ,117] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[97 ,117] Pb(232) Syntax error on token ""Weekend day"", delete this token[126 ,138] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[143 ,191] Pb(19) Type mismatch: cannot convert from Object to String[417 ,421] junit.framework.AssertionFailedError: Wrong number of problems, is: 7, expected: 3 Pb(1103) Switch Expressions is a preview feature and disabled by default. Use --enable-preview to enable[82 ,404] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[97 ,117] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[97 ,117] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[97 ,117] Pb(232) Syntax error on token ""Weekend day"", delete this token[126 ,138] Pb(1103) Multi constant case is a preview feature and disabled by default. Use --enable-preview to enable[143 ,191] Pb(19) Type mismatch: cannot convert from Object to String[417 ,421] at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.TestCase.assertTrue(TestCase.java:192) at org.eclipse.jdt.ui.tests.quickfix.QuickFixTest.assertNumberOfProblems(QuickFixTest.java:307) at org.eclipse.jdt.ui.tests.quickfix.QuickFixTest.collectCorrections(QuickFixTest.java:281) at org.eclipse.jdt.ui.tests.quickfix.QuickFixTest.collectCorrections(QuickFixTest.java:276) at org.eclipse.jdt.ui.tests.quickfix.QuickFixTest12.testEnablePreviewsAndOpenCompilerPropertiesProposals(QuickFixTest12.java:125) New Gerrit change created: https://git.eclipse.org/r/147252 Gerrit change https://git.eclipse.org/r/147252 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=7b38bdc12f6a2b8c3f3a532fd0cfb5a082987e6a Change have been released. The change is based on the fix made in Bug 548476. To be verified in the next I-build. (In reply to Andrey Loskutov from comment #15) > (In reply to Noopur Gupta from comment #14) > > Changes have been released. To be verified in the next I-build. > > Unfortunately still fails on all platforms: > > https://download.eclipse.org/eclipse/downloads/drops4/I20190807-1800/testresults/html/org.eclipse.jdt.ui.tests_ep413I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html > > > testEnablePreviewsAndOpenCompilerPropertiesProposals As mentioned in comment #8, the above test is not in the scope of this bug report. This bug report is about the impact of DOM changes in JDT UI. The above tests fails due to a different change in the compiler. Kalyan, please move the fix for the above test to a separate bug and capture your discussion with JDT Core team about the required changes and impact on UI features there. Marking this bug as verified as all the DOM related tests have passed in the latest I-build. (In reply to Noopur Gupta from comment #19) > (In reply to Andrey Loskutov from comment #15) > > (In reply to Noopur Gupta from comment #14) > > > Changes have been released. To be verified in the next I-build. > > > > Unfortunately still fails on all platforms: > > > > https://download.eclipse.org/eclipse/downloads/drops4/I20190807-1800/testresults/html/org.eclipse.jdt.ui.tests_ep413I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html > > > > > > testEnablePreviewsAndOpenCompilerPropertiesProposals > > As mentioned in comment #8, the above test is not in the scope of this bug > report. > > This bug report is about the impact of DOM changes in JDT UI. The above > tests fails due to a different change in the compiler. > > Kalyan, please move the fix for the above test to a separate bug and capture > your discussion with JDT Core team about the required changes and impact on > UI features there. > > Marking this bug as verified as all the DOM related tests have passed in the > latest I-build. Created Bug 549882 for the same. Needs to be merged to Beta branch with taking care about BreakStatement changes as they are not applicable for Java 13 and also change from 12 to 13 for previewEnabled checks in SwitchCase, Switch expression etc. |