Skip to content

Commit

Permalink
fixed release version
Browse files Browse the repository at this point in the history
  • Loading branch information
asebak committed Apr 8, 2016
1 parent b6f9bae commit aeb997b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 42 deletions.
6 changes: 5 additions & 1 deletion META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<idea-plugin version="2">
<id>com.atsebak.raspberrypi</id>
<name>Embedded Linux JVM Debugger (Raspberry Pi, BeagleBone Black, Intel Galileo II, etc)</name>
<version>1.20</version>
<version>1.21</version>
<vendor email="[email protected]" url="http://www.atsebak.com">At Sebak</vendor>

<description><![CDATA[
<p>Java Runner/Debugger for Embedded Systems that run on any variant of the Embedded Linux Kernel</p>
]]></description>

<change-notes><![CDATA[
<b>Version 1.21</b>
<ul>
<li>Configurable SSH Port </li>
</ul>
<b>Version 1.20</b>
<ul>
<li>Fixed project templates</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,7 @@ private void closeSSHConnection() {
private void closeDescriptors() {
//todo remove remote debugger console
final Collection<RunContentDescriptor> descriptors =
ExecutionHelper.findRunningConsoleByTitle(project, new NotNullFunction<String, Boolean>() {
@NotNull
@Override
public Boolean fun(String title) {
return AppCommandLineState.getRunConfigurationName(String.valueOf(configuration.getRunnerParameters().getPort())).equals(title);
}
});
ExecutionHelper.findRunningConsoleByTitle(project, title -> AppCommandLineState.getRunConfigurationName(configuration.getRunnerParameters().getPort()).equals(title));
// for (RunContentDescriptor descriptor : descriptors) {
// final Content content = descriptor.getAttachedContent();
// }
Expand Down Expand Up @@ -237,27 +231,19 @@ protected JavaParameters createJavaParameters() throws ExecutionException {
final Application app = ApplicationManager.getApplication();

//deploy on Non-read thread so can execute right away
app.executeOnPooledThread(new Runnable() {
@Override
public void run() {
ApplicationManager.getApplication().runReadAction(new Runnable() {
@Override
public void run() {
try {
ClasspathService service = ServiceManager.getService(project, ClasspathService.class);
List<File> hostLibraries = invokeClassPathResolver(classPath.getPathList(), manager.getProjectSdk());
File classpathArchive = FileUtilities.createClasspathArchive(service.invokeFindDeployedJars(hostLibraries, buildTargetHandler()), project);
invokeDeployment(classpathArchive.getPath(), commandLineTarget);
} catch (Exception e) {
EmbeddedLinuxJVMConsoleView.getInstance(project).print(EmbeddedLinuxJVMBundle.message("pi.connection.failed", e.getMessage()) + "\r\n",
ConsoleViewContentType.ERROR_OUTPUT);
JavaStatusChecker javaStatusChecker = new JavaStatusChecker(null, EmbeddedLinuxJVMConsoleView.getInstance(project));
javaStatusChecker.stopApplication(-1);
}
}
});
app.executeOnPooledThread(() -> ApplicationManager.getApplication().runReadAction(() -> {
try {
ClasspathService service = ServiceManager.getService(project, ClasspathService.class);
List<File> hostLibraries = invokeClassPathResolver(classPath.getPathList(), manager.getProjectSdk());
File classpathArchive = FileUtilities.createClasspathArchive(service.invokeFindDeployedJars(hostLibraries, buildTargetHandler()), project);
invokeDeployment(classpathArchive.getPath(), commandLineTarget);
} catch (Exception e) {
EmbeddedLinuxJVMConsoleView.getInstance(project).print(EmbeddedLinuxJVMBundle.message("pi.connection.failed", e.getMessage()) + "\r\n",
ConsoleViewContentType.ERROR_OUTPUT);
JavaStatusChecker javaStatusChecker = new JavaStatusChecker(null, EmbeddedLinuxJVMConsoleView.getInstance(project));
javaStatusChecker.stopApplication(-1);
}
});
}));

//invoke later because it reads from other threads(debugging executor)
ProgressManager.getInstance().run(new Task.Backgroundable(project, EmbeddedLinuxJVMBundle.message("pi.deploy"), true) {
Expand All @@ -269,12 +255,7 @@ public void run(@NotNull ProgressIndicator progressIndicator) {
//this should wait until the deployment states that it's listening to the port
while (!outputForwarder.toString().contains(initializeMsg)) {
}
app.invokeLater(new Runnable() {
@Override
public void run() {
closeOldSessionAndDebug(project, configuration.getRunnerParameters());
}
});
app.invokeLater(() -> closeOldSessionAndDebug(project, configuration.getRunnerParameters()));
}
}
});
Expand Down Expand Up @@ -340,13 +321,7 @@ private RunnerAndConfigurationSettings createRunConfiguration(Project project, S
private void closeOldSession(final Project project, EmbeddedLinuxJVMRunConfigurationRunnerParameters parameters) {
final String configurationName = AppCommandLineState.getRunConfigurationName(parameters.getPort());
final Collection<RunContentDescriptor> descriptors =
ExecutionHelper.findRunningConsoleByTitle(project, new NotNullFunction<String, Boolean>() {
@NotNull
@Override
public Boolean fun(String title) {
return configurationName.equals(title);
}
});
ExecutionHelper.findRunningConsoleByTitle(project, configurationName::equals);

if (descriptors.size() > 0) {
final RunContentDescriptor descriptor = descriptors.iterator().next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void checkEmbeddedSettings(EmbeddedLinuxJVMRunConfigurationRunnerP
if (StringUtil.isEmptyOrSpaces(rp.getHostname())) {
throw new RuntimeConfigurationWarning(EmbeddedLinuxJVMBundle.getString("pi.invalid.hostname"));
}
if (StringUtil.isEmptyOrSpaces(String.valueOf(rp.getPort()))) {
if (StringUtil.isEmptyOrSpaces(rp.getPort())) {
throw new RuntimeConfigurationWarning(EmbeddedLinuxJVMBundle.getString("pi.invalid.port"));
}
if (StringUtil.isEmptyOrSpaces(rp.getUsername())) {
Expand Down

0 comments on commit aeb997b

Please sign in to comment.