Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ dependencies {
testImplementation(libs.junit.jupiter.api)
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly(libs.junit.vintage.engine)
// Required for IntelliJ Platform 2026.1 to discover and run tests via JUnit Platform
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.11.0")
}

// Set the JDK version used by the toolchain to build the project (Java 21 is required for platform 2025.3).
Expand Down Expand Up @@ -178,7 +180,7 @@ intellijPlatform {
types = listOf(IntelliJPlatformType.IntellijIdea)
channels = listOf(ProductRelease.Channel.RELEASE) // Only stable releases
sinceBuild = "242" // From your minimum supported version
untilBuild = "253.*" // Up to current major version
untilBuild = "261.*" // Up to current major version
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.intellij.openapi.editor.actions.ScrollToTheEndToolbarAction;
import com.intellij.openapi.project.Project;
import com.intellij.psi.search.GlobalSearchScope;
import com.redhat.devtools.lsp4ij.console.actions.ClearThisConsoleAction;
import com.redhat.devtools.lsp4ij.console.actions.LSPClearConsoleAction;
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
Expand Down Expand Up @@ -48,6 +48,6 @@ public LSPConsoleViewBase(@NotNull Project project,
protected void fillConsoleActions(List<AnAction> consoleActions) {
consoleActions.add(new ScrollToTheEndToolbarAction(getEditor()));
consoleActions.add(ActionManager.getInstance().getAction("Print"));
consoleActions.add(new ClearThisConsoleAction(this));
consoleActions.add(new LSPClearConsoleAction(this));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
*
* @author Angelo ZERR
*/
public class ClearThisConsoleAction extends ClearConsoleAction {
public class LSPClearConsoleAction extends ClearConsoleAction {
private final ConsoleView myConsoleView;

public ClearThisConsoleAction(@NotNull ConsoleView consoleView) {
public LSPClearConsoleAction(@NotNull ConsoleView consoleView) {
myConsoleView = consoleView;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.intellij.openapi.project.Project;
import com.intellij.psi.search.GlobalSearchScope;
import com.redhat.devtools.lsp4ij.console.actions.AutoFoldingAction;
import com.redhat.devtools.lsp4ij.console.actions.ClearThisConsoleAction;
import com.redhat.devtools.lsp4ij.console.actions.LSPClearConsoleAction;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
Expand Down Expand Up @@ -130,7 +130,7 @@ private static int findLastCompleteJsonBlockEnd(@NotNull String text) {
consoleActions.add(new ScrollToTheEndToolbarAction(editor));
}
consoleActions.add(ActionManager.getInstance().getAction("Print"));
consoleActions.add(new ClearThisConsoleAction(this));
consoleActions.add(new LSPClearConsoleAction(this));
return consoleActions.toArray(AnAction.EMPTY_ARRAY);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ protected void assertFoldingRanges(@NotNull String fileName,

PsiFile file = myFixture.configureByText(fileName, stripTokens(fileBody));
Editor editor = myFixture.getEditor();
// Move the caret to the end to avoid implicitly opening a fold region that would
// interfere with the test assertions. This was required because JB 2026.1
// started accounting for caret positions in tests in the:
// EditorTestUtil.buildInitialFoldingsInBackground()
// function.
editor.getCaretModel().moveToOffset(file.getTextLength());

// Initialize the language server
try {
Expand Down
Loading