Skip to content

Commit

Permalink
Merge pull request #51 from SergejT34/fix-old_edt-deprecation
Browse files Browse the repository at this point in the history
Fix #50 ActionUpdateThread.OLD_EDT deprecation
  • Loading branch information
siarheiburliayeu authored Feb 20, 2024
2 parents 46f2f6f + bec9421 commit df995c0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/sburlyaev/cmd/plugin/CommandBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public static Command createCommand(@NotNull Environment env,
}

case MAC_OS -> {
//noinspection SwitchStatementWithTooFewBranches
return switch (terminal) {
case ALACRITTY ->
new Command("open", "-n", "-a", command, "--args", "--working-directory", projectDirectory);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.sburlyaev.cmd.plugin;

import com.sburlyaev.cmd.plugin.model.Command;

import java.io.File;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class JustForTroubleshooting {

private static final Pattern OS_VERSION_PATTERN = Pattern.compile("^(\\d+\\.\\d+).*");

public static void main(String[] args) throws IOException {
public static void main(String[] args) {
String osName = System.getProperty("os.name");
String osVersion = System.getProperty("os.version");
String gui = System.getProperty("sun.desktop");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sburlyaev.cmd.plugin.actions;

import com.intellij.ide.actions.RevealFileAction;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.project.Project;
Expand Down Expand Up @@ -41,4 +42,8 @@ private VirtualFile getSelectedDirectory(@NotNull AnActionEvent event) {
: null;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.intellij.ide.actions.RevealFileAction;
import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.diagnostic.Logger;
Expand Down Expand Up @@ -50,4 +51,8 @@ private VirtualFile getSelectedDirectory(@NotNull AnActionEvent event) {
: null;
}

@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

public class PluginSettingsConfigurable implements Configurable {

private PluginSettingsForm pluginSettingsForm;
private PluginSettings pluginSettings;
private final PluginSettingsForm pluginSettingsForm;
private final PluginSettings pluginSettings;

private FileChooserDescriptor terminalChooserDescriptor;
private final FileChooserDescriptor terminalChooserDescriptor;
private final Project project;
private VirtualFile selectedTerminal;

Expand Down Expand Up @@ -105,8 +105,4 @@ public void reset() {
pluginSettingsForm.setSettingsState(pluginSettings.getState());
}
}

@Override
public void disposeUIResources() {
}
}

0 comments on commit df995c0

Please sign in to comment.