Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* idea plugin: maintenance - 2024.1 eap support #769

Merged
merged 4 commits into from
Feb 8, 2024
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 plugins/idea/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ dependencies {
exclude group: 'com.mobidevelop.robovm', module: 'robovm-templates-console'
}
robovm_dist "com.mobidevelop.robovm:robovm-dist:${roboVMVersion}:[email protected]"

implementation 'org.apache.commons:commons-compress:1.25.0'
}

intellij {
version = '2021.1' // we are compiles against this API version
version = '2022.3' // we are compiles against this API version
plugins = ['java', 'maven', 'gradle']
updateSinceUntilBuild = false
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/idea/src/main/java/org/robovm/idea/RoboVmPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import com.intellij.ui.content.Content;
import com.intellij.util.PlatformUtils;
import com.intellij.util.ui.UIUtil;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
Expand Down Expand Up @@ -325,7 +325,7 @@ private static void extractArchive(String archive, File dest) {
archive = "/" + archive;
try (TarArchiveInputStream in = new TarArchiveInputStream(new GZIPInputStream(RoboVmPlugin.class.getResourceAsStream(archive)))) {
boolean filesWereUpdated = false;
ArchiveEntry entry;
TarArchiveEntry entry;
while ((entry = in.getNextEntry()) != null) {
File f = new File(dest, entry.getName());
if (entry.isDirectory()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ public class ASNewProjectAction extends AnAction {
public ASNewProjectAction() {
}

@Override
public boolean startInTransaction() {
return true;
}

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
NewProjectWizard wizard = new NewProjectWizard(null, ModulesProvider.EMPTY_MODULES_PROVIDER, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.module.Module;
Expand Down Expand Up @@ -47,6 +48,11 @@ public void actionPerformed(@NotNull AnActionEvent e) {
}
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}

@Override
public void update(AnActionEvent e) {
e.getPresentation().setEnabled(!busy.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import org.robovm.idea.ibxcode.RoboVmIbXcodeProjectTask;

import java.io.File;
import java.io.IOException;
Expand All @@ -43,6 +43,11 @@ public void actionPerformed(AnActionEvent anActionEvent) {
ProgressManager.getInstance().run(new CleanTask());
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}

@Override
public void update(AnActionEvent e) {
e.getPresentation().setEnabled(!busy.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.robovm.idea.actions;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.LangDataKeys;
Expand Down Expand Up @@ -56,6 +57,11 @@ private Module workaroundModuleGroupingIssue(Module module) {
return module;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.BGT;
}

@Override
public void update(AnActionEvent e) {
e.getPresentation().setEnabled(!RoboVmIbXcodeProjectTask.isBusy() && isValidModuleEvent(e));
Expand Down
2 changes: 1 addition & 1 deletion plugins/idea/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<depends optional="true" config-file="com.mobidevelop.robovm.intellij-maven.xml">org.jetbrains.idea.maven</depends>
<depends>org.jetbrains.plugins.gradle</depends>
<depends>com.intellij.modules.java</depends>
<idea-version since-build="221"/>
<idea-version since-build="223"/>

<name>MobiVM</name>
<description>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.21</version>
<version>1.25.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.plist</groupId>
Expand Down
Loading