Skip to content

Commit

Permalink
fixes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadsebak committed Jun 4, 2015
1 parent 630e3f6 commit 488ca34
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 7 additions & 1 deletion META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
<idea-plugin version="2">
<id>com.atsebak.raspberrypi</id>
<name>Embedded Linux JVM Debugger (Raspberry Pi, Intel x86, ARM processors)</name>
<version>0.33</version>
<version>0.35</version>
<vendor email="[email protected]" url="http://www.atsebak.com">At Sebak</vendor>

<description><![CDATA[
<p>Embedded Linux Java Debugger for Embedded Systems</p>
]]></description>

<change-notes><![CDATA[
<b>Version 0.35</b>
<ul>
<li>
Fixed Debug deduplicate vm argument
</li>
</ul>
<b>Version 0.33</b>
<ul>
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.atsebak.embeddedlinuxjvm.runner.conf.EmbeddedLinuxJVMRunConfiguration;
import com.intellij.execution.configurations.JavaParameters;
import lombok.Builder;
import org.apache.commons.lang.StringUtils;

import java.util.Map;

Expand Down Expand Up @@ -38,7 +39,9 @@ public String toString() {
*/
private void addArguments(StringBuilder cmdBuf) {
for (String arg : parameters.getProgramParametersList().getParameters()) {
cmdBuf.append(' ').append(arg.trim());
if (!arg.contains("transport=dt_socket") && StringUtils.isNotBlank(arg)) {
cmdBuf.append(' ').append(arg.trim());
}
}
}

Expand Down Expand Up @@ -71,7 +74,9 @@ private void addVMArguments(StringBuilder cmdBuf) {
embeddedLinuxJVMRunConfiguration.getRunnerParameters().getPort());
}
for (String arg : parameters.getVMParametersList().getParameters()) {
cmdBuf.append(' ').append(arg.trim());
if (!arg.contains("transport=dt_socket") && StringUtils.isNotBlank(arg)) {
cmdBuf.append(' ').append(arg.trim());
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public void setUp() {
when(javaParameters.getProgramParametersList()).thenReturn(parametersList);
when(javaParameters.getProgramParametersList().getParameters()).thenReturn(new ArrayList<String>());
when(javaParameters.getVMParametersList()).thenReturn(parametersList);
when(javaParameters.getVMParametersList().getParameters()).thenReturn(new ArrayList<String>());
when(javaParameters.getMainClass()).thenReturn(parameters.getMainclass());
}

@Test
public void testRunCommand() {
when(javaParameters.getVMParametersList().getParameters()).thenReturn(new ArrayList<String>());
String runCommand = CommandLineTarget.builder()
.isDebugging(false)
.parameters(javaParameters)
Expand Down

0 comments on commit 488ca34

Please sign in to comment.