Skip to content
Open
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
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ plugins {
version = System.getenv("TRAVIS_TAG")

intellij {
version '2021.1'
version '2020.1'
plugins 'java'
updateSinceUntilBuild false
}

compileJava {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import java.awt.*;

class RemoteExecutionConfigEditor extends SettingsEditor<RemoteExecutionConfig> {
private JLabel classToRun = new JLabel("");
private JLabel module = new JLabel("");
private JTextField classToRun = new JTextField("");
private JTextField module = new JTextField("");
private JTextField commandArgs = new JTextField();
private JTextField jvmArgs = new JTextField();
private JTextField remoteHost = new JTextField();
Expand All @@ -34,6 +34,8 @@ protected void resetEditorFrom(@NotNull RemoteExecutionConfig o) {

@Override
protected void applyEditorTo(@NotNull RemoteExecutionConfig o) throws ConfigurationException {
o.setClassToRun(classToRun.getText());
o.setModuleName(module.getText());
o.setCommandArgs(commandArgs.getText());
o.setJvmArgs(jvmArgs.getText());
o.setRemoteHost(remoteHost.getText());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ public void startNotify() {

runningProcess = Executors.newSingleThreadExecutor().submit(() -> {
notifyTextAvailable("Going to run on " + hostName + " with " + javaExec + "\n", STDERR);
int result = executeCommand(syncCommand(requiredFiles), SYSTEM);
int result = executeCommand(syncCommand(requiredFiles), STDERR);
if (result != 0) {
notifyTextAvailable("Sync failed: " + result + "\n", STDERR);
notifyProcessTerminated(result);
throw new RuntimeException("Sync failed");
}

Expand Down Expand Up @@ -129,7 +130,7 @@ private int executeCommand(String[] cmd, Key outType) {

private Process execute(String[] cmd, Key outType) {
try {
notifyTextAvailable(asList(cmd).stream().collect(joining(" ")) + "\n", SYSTEM);
notifyTextAvailable(asList(cmd).stream().collect(joining(" ")) + "\n", STDERR);
Process process = new ProcessBuilder(cmd).start();

delegateOrDropOutput.setOutput(process.getOutputStream());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public JComponent createComponent() {
commandArgsField.setText(propertiesComponent.getValue(COMMAND_ARGS_PROPERTY, ""));
hostNameField.setText(propertiesComponent.getValue(HOSTNAME_PROPERTY, ""));
remoteUserField.setText(propertiesComponent.getValue(USER_PROPERTY, ""));
javaExecField.setText(propertiesComponent.getValue(JAVA_EXEC_PROPERTY, ""));
javaExecField.setText(propertiesComponent.getValue(JAVA_EXEC_PROPERTY, "java"));

return container;
}
Expand Down
16 changes: 7 additions & 9 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@
<id>jheister.intellijremoteexecute</id>
<name>intellij-remote-execute</name>
<version>1.0</version>
<vendor email="support@yourcompany.com" url="http://www.yourcompany.com">YourCompany</vendor>
<vendor email="no@email.com" url="https://github.com/jheister/intellij-remote-execute">Justin Heister</vendor>

<description><![CDATA[
Enter short description for your plugin here.<br>
<em>most HTML tags may be used</em>
This is a IntelliJ plugin designed to allow you to copy your code to a server and run it. <br/>
The logs display within IntelliJ and you can even debug the running code! <br/>
Simply right click the Java class you wish to run and select Run 'Remote ...' or Debug 'Remote ...' option. <br/>
Note: this works only if you don't have other Run options on this class
]]></description>

<change-notes><![CDATA[
Add change notes here.<br>
<em>most HTML tags may be used</em>
]]>
</change-notes>
<change-notes></change-notes>

<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
<idea-version since-build="145.0"/>
<idea-version since-build="173.0"/>

<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
Expand Down