Skip to content

Commit b878016

Browse files
Merge remote-tracking branch 'upstream/main' into clean-up-cron-job
2 parents 443b273 + 73683c7 commit b878016

File tree

10 files changed

+36
-22
lines changed

10 files changed

+36
-22
lines changed

build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
44
plugins {
55
id 'java'
6-
id 'org.jetbrains.intellij.platform' version '2.7.2'
6+
id 'org.jetbrains.intellij.platform' version '2.10.1'
77
id 'org.jetbrains.kotlin.jvm' version '2.0.20'
88
}
99

1010
group 'io.openliberty.tools'
11-
version '25.0.9'
11+
version '25.0.12-SNAPSHOT'
1212

1313
def remoteRobotVersion = "0.11.23"
1414
// To switch to nightly version, append "@nightly" to the version number (i.e. 0.4.1-20240828-013108@nightly)
@@ -178,7 +178,7 @@ task copyDeps(type: Copy) {
178178
intellijPlatformTesting.runIde {
179179
runIdeLocally {
180180
version = providers.gradleProperty("ideTargetVersion")
181-
type = IntelliJPlatformType.IntellijIdeaCommunity
181+
type = IntelliJPlatformType.IntellijIdea
182182
task {
183183
jvmArgumentProviders.add({
184184
[
@@ -203,7 +203,7 @@ test {
203203
intellijPlatformTesting.runIde {
204204
runIdeForUiTests {
205205
version = providers.gradleProperty("ideTargetVersion")
206-
type = IntelliJPlatformType.IntellijIdeaCommunity
206+
type = IntelliJPlatformType.IntellijIdea
207207
task {
208208
jvmArgumentProviders.add({
209209
[
@@ -216,6 +216,8 @@ intellijPlatformTesting.runIde {
216216
"-Dide.mac.file.chooser.native=false",
217217
"-DjbScreenMenuBar.enabled=false",
218218
"-Dapple.laf.useScreenMenuBar=false",
219+
// This disables the EAP login prompt:
220+
"-Deap.require.license=release"
219221
]
220222
} as CommandLineArgumentProvider)
221223
systemProperty("ide.native.launcher", "true")
@@ -231,7 +233,7 @@ intellijPlatform {
231233
pluginConfiguration {
232234
ideaVersion {
233235
sinceBuild = providers.gradleProperty("pluginSinceBuild")
234-
untilBuild = providers.gradleProperty("pluginUntilBuild")
236+
untilBuild = provider { null }
235237
}
236238
changeNotes = """
237239
<h2> 25.0.9 </h2>

gradle.properties

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
useLocal=false
2-
pluginSinceBuild=243
3-
pluginUntilBuild=252.*
2+
pluginSinceBuild=251
43

54
javaVersion=21
65

76
# Target IntelliJ Community by default
8-
platformType=IC
7+
platformType=IU
98
platformVersion=2024.3.6
10-
ideTargetVersion=2025.2.1
9+
ideTargetVersion=253.28294.251
1110

1211
# Example: platformBundledPlugins = com.intellij.java
1312
platformBundledPlugins=com.intellij.java, org.jetbrains.idea.maven, com.intellij.gradle, org.jetbrains.plugins.terminal, com.intellij.properties

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/java/io/openliberty/tools/intellij/LibertyExplorer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import com.intellij.ide.DataManager;
1313
import com.intellij.openapi.actionSystem.*;
14+
import com.intellij.openapi.actionSystem.ex.ActionUtil;
1415
import com.intellij.openapi.actionSystem.impl.SimpleDataContext;
1516
import com.intellij.openapi.application.ApplicationManager;
1617
import com.intellij.openapi.application.ModalityState;
@@ -284,9 +285,10 @@ private static void executeAction(Tree tree) {
284285
}
285286
LibertyGeneralAction action = (LibertyGeneralAction) am.getAction(actionId);
286287
if (action != null) {
287-
action.actionPerformed(new AnActionEvent(DataManager.getInstance().getDataContext(tree),
288+
AnActionEvent event = new AnActionEvent(DataManager.getInstance().getDataContext(tree),
288289
new Presentation(), ActionPlaces.UNKNOWN, ActionUiKind.NONE, null,
289-
0, am));
290+
0, am);
291+
ActionUtil.performActionDumbAwareWithCallbacks(action, event);
290292
}
291293
}
292294
}

src/main/java/io/openliberty/tools/intellij/actions/RunLibertyDevTask.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020, 2024 IBM Corporation.
2+
* Copyright (c) 2020, 2025 IBM Corporation.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -11,6 +11,7 @@
1111

1212
import com.intellij.ide.DataManager;
1313
import com.intellij.openapi.actionSystem.*;
14+
import com.intellij.openapi.actionSystem.ex.ActionUtil;
1415
import com.intellij.openapi.diagnostic.Logger;
1516
import com.intellij.openapi.project.Project;
1617
import com.intellij.openapi.wm.ToolWindow;
@@ -81,7 +82,8 @@ private void handleLibertyTreeEvent(@NotNull AnActionEvent e, Project project, b
8182
} else {
8283
// calls selected action
8384
AnAction action = ActionManager.getInstance().getAction(Constants.FULL_ACTIONS_MAP.get(lastPathComponent));
84-
action.actionPerformed(new AnActionEvent(DataManager.getInstance().getDataContext(libertyTree), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance()));
85+
AnActionEvent event = new AnActionEvent(DataManager.getInstance().getDataContext(libertyTree), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance());
86+
ActionUtil.performActionDumbAwareWithCallbacks(action, event);
8587
}
8688
}
8789
}
@@ -117,7 +119,8 @@ public void actionPerformed(@NotNull AnActionEvent e) {
117119
String selectedAction = libertyActions[ret];
118120
// run selected action
119121
AnAction action = ActionManager.getInstance().getAction(Constants.FULL_ACTIONS_MAP.get(selectedAction));
120-
action.actionPerformed(new AnActionEvent(e.getDataContext(), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance()));
122+
AnActionEvent event = new AnActionEvent(e.getDataContext(), e.getPresentation(), e.getPlace(), ActionUiKind.NONE, null, 0, ActionManager.getInstance());
123+
ActionUtil.performActionDumbAwareWithCallbacks(action, event);
121124
}
122125
} else {
123126
handleLibertyTreeEvent(e, project, false);

src/main/java/io/openliberty/tools/intellij/runConfiguration/LibertyRunConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.intellij.execution.executors.DefaultDebugExecutor;
1616
import com.intellij.execution.runners.ExecutionEnvironment;
1717
import com.intellij.openapi.actionSystem.*;
18+
import com.intellij.openapi.actionSystem.ex.ActionUtil;
1819
import com.intellij.openapi.actionSystem.impl.SimpleDataContext;
1920
import com.intellij.openapi.diagnostic.Logger;
2021
import com.intellij.openapi.module.Module;
@@ -159,7 +160,7 @@ public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEn
159160
.build();
160161

161162
AnActionEvent event = new AnActionEvent(dataCtx, new Presentation(), ActionPlaces.UNKNOWN, ActionUiKind.NONE, null, 0, ActionManager.getInstance());
162-
action.actionPerformed(event);
163+
ActionUtil.performActionDumbAwareWithCallbacks(action, event);
163164

164165
// return null because we are not plugging into "Run" tool window in IntelliJ, just terminal and Debug
165166
return null;

src/test/java/io/openliberty/tools/intellij/it/SingleModJakartaLSTestCommon.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ public void testJakartaDiagnosticsInJavaPart() {
149149
/**
150150
* Tests Jakarta Language Server quick fix support in a Java source file
151151
*/
152-
// @Test
153-
// @Video
152+
@Test
153+
@Video
154154
public void testJakartaQuickFixInJavaPart() {
155155
String publicString = "public Response getProperties() {";
156156
String privateString = "private Response getProperties() {";

src/test/java/io/openliberty/tools/intellij/it/SingleModMPProjectCfgTestCommon.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ public void setSmMPProjectName(String name) {
102102
@BeforeEach
103103
public void beforeEach(TestInfo info) {
104104
TestUtils.printTrace(TestUtils.TraceSevLevel.INFO, this.getClass().getSimpleName() + "." + info.getDisplayName() + ". Entry");
105+
// IntelliJ does not start building and indexing until the Project View is open
106+
UIBotTestUtils.waitForIndexing(remoteRobot);
105107
}
106108

107109
/**

src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ public static void clickOnFileTab(RemoteRobot remoteRobot, String fileName) {
744744
ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofSeconds(10));
745745

746746
try {
747-
String xPath = "//div[@accessiblename='" + fileName + "' and @class='EditorTabLabel']";
747+
String xPath = "//div[starts-with(@accessiblename, '" + fileName + "') and @class='EditorTabLabel']";
748748
ComponentFixture actionButton = projectFrame.getActionButton(xPath, "10");
749749
actionButton.click();
750750

@@ -780,7 +780,7 @@ public static void hoverInAppServerCfgFile(RemoteRobot remoteRobot, String hover
780780
// Find the target text on the editor and move the move to it.
781781
editorNew.findText(contains(hoverTarget)).moveMouse();
782782
// clear and "lightbulb" icons?
783-
if (!hoverFile.equals("server.xml")) {
783+
if (!hoverFile.startsWith("server.xml")) {
784784
keyboard.hotKey(VK_ESCAPE);
785785
}
786786

@@ -2069,6 +2069,11 @@ public static void createLibertyConfiguration(RemoteRobot remoteRobot, String cf
20692069
ActionButtonFixture addCfgButton = addProjectDialog.actionButton(addButtonLocator);
20702070
addCfgButton.click();
20712071

2072+
// Click on the Collapse All button.
2073+
Locator collapseButtonLocator = byXpath("//div[@accessiblename='Collapse All']");
2074+
ActionButtonFixture collapseButton = addProjectDialog.actionButton(collapseButtonLocator);
2075+
collapseButton.click();
2076+
20722077
// Look for the Liberty entry in the Add New configuration window and create a new configuration.
20732078
ComponentFixture pluginCfgTree = addProjectDialog.getMyTree();
20742079
RepeatUtilsKt.waitFor(Duration.ofSeconds(10),
@@ -2400,7 +2405,7 @@ public static void selectConfigUsingMenu(RemoteRobot remoteRobot, String cfgName
24002405
public static void runConfigUsingIconOnToolbar(RemoteRobot remoteRobot, ExecMode execMode) {
24012406
ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofSeconds(10));
24022407

2403-
Locator locator = byXpath("//div[@class='ActionButton' and @myaction='Run (Run selected configuration)']");
2408+
Locator locator = byXpath("//div[@class='ActionButton' and @myaction='Run (Run the selected configuration)']");
24042409
if (execMode == ExecMode.DEBUG) {
24052410
locator = byXpath("//div[@class='ActionButton' and @myicon='debug.svg']");
24062411
}

src/test/java/io/openliberty/tools/intellij/it/fixtures/ProjectFrameFixture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public static void clickMenuOption(ProjectFrameFixture projectFrame, String text
251251
public ComponentFixture getInplaceButton(String... xpathVars) {
252252
String name = xpathVars[0];
253253
String waitTime = xpathVars[1];
254-
Locator locator = byXpath("//div[@accessiblename='" + name + "' and @class='EditorTabLabel']//div[@class='InplaceButton']");
254+
Locator locator = byXpath("//div[starts-with(@accessiblename, '" + name + "') and @class='EditorTabLabel']//div[@class='InplaceButton']");
255255
return find(ComponentFixture.class, locator, Duration.ofSeconds(Integer.parseInt(waitTime)));
256256
}
257257

0 commit comments

Comments
 (0)