HaxeFoundation / intellij-haxe

Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
http://intellij-haxe.org
Apache License 2.0
219 stars 100 forks source link

Tests are not building for IDEA 2022.3.3 #1125

Closed Deirel closed 1 year ago

Deirel commented 1 year ago

There is "cannot find symbol" Java error on the import line in the HaxeCodeInsightFixtureTestCase class:

import com.intellij.codeInsight.daemon.impl.HighlightVisitorBasedInspection

It appears to be that this class isn't presented in com.jetbrains:ideaIU:2022.3.3.

m0rkeulv commented 1 year ago

DefaultHighlightVisitorBasedInspection was removed in later versions (2023.x) and since i want to target the later version i migrated the code to use HighlightVisitorBasedInspection . Note that this change should not affect the compatibility of built plugin (it shuild work fine with 2022.3.3)

if you need to build with 2022.3.3 as your target for some reason just replace

import com.intellij.codeInsight.daemon.impl.HighlightVisitorBasedInspection;

with

import com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitorBasedInspection;

and

  protected InspectionProfileEntry getAnnotatorBasedInspection() {
    HighlightVisitorBasedInspection inspection = new HighlightVisitorBasedInspection();
    inspection.setHighlightErrorElements(false);
    inspection.setRunAnnotators(true);
    return inspection;
  }

with

  protected InspectionProfileEntry getAnnotatorBasedInspection() {
    return new DefaultHighlightVisitorBasedInspection.AnnotatorBasedInspection();
  }
Deirel commented 1 year ago

Thank you for the answer. Yes, I did just that. Didn't know that the plugin built for 2023 should work on 2022. There is no issue in this case, I think.

Deirel commented 1 year ago

I'm closing the issue