Skip to content

I20240726-1800

@iloveeclipse iloveeclipse tagged this 26 Jul 15:43
Follow up from
https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2536.
After switching to minimal 1.8 project compliance in JDT, test
`PluginsNotLoadedTest.pluginsNotLoaded` fails complaining about loaded
org.eclipse.jdt.junit bundle.

See
https://download.eclipse.org/eclipse/downloads/drops4/I20240725-1800/testresults/html/org.eclipse.jdt.text.tests_ep433I-unit-cen64-gtk3-java22_linux.gtk.x86_64_22.html

Interestingly, it doesn't fail on both Mac platforms, but see below.

While debugging (break point at
`org.eclipse.jdt.internal.junit.ui.JUnitPlugin.start(BundleContext)`)
one can see that the class is loaded at
`org.eclipse.jdt.text.tests.MarkOccurrenceTest.markMethodOccurrences()`
test, which, surprisingly ... opens Java editor on
`junit.framework.TestCase` class and that one tries to draw warning
marker annotations that in turn activate warning marker quick fix
processor `org.eclipse.jdt.internal.junit.ui.JUnitQuickFixProcessor`
that triggers JUnit loading.

Not clear why this doesn't work on Mac, probably drawing there is a bit
different and so no JUnit bundle is loaded.

To solve that, let run PluginsNotLoadedTest as first test in the test
suite (not sure why it wasn't done before).

Also while debugging the test I saw that the JUnit bundle is not loaded
if the welcome page was open, which was hiding opened Java editor and
that in turn didn't activated all of Java editor functionality. So let
close welcome page, which should have been done anyway for any UI test.
Assets 2
Loading