Skip to content

Commit

Permalink
Merge pull request #124 from piotrhoppe/the-run-parameters-issue
Browse files Browse the repository at this point in the history
Replace a split method by a StringTokenizer clas to parse run param.
  • Loading branch information
albilu authored Oct 16, 2024
2 parents 5aa8f1f + ce4077a commit 4c76adc
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import java.util.List;
import java.util.Properties;
import java.util.logging.Logger;
import org.apache.commons.text.StringTokenizer;
import org.apache.commons.text.matcher.StringMatcherFactory;
import org.netbeans.api.extexecution.ExecutionService;
import org.netbeans.api.project.Project;
import org.netbeans.modules.python.PythonOutputLine;
Expand Down Expand Up @@ -57,8 +59,7 @@ public static List<String> getRunArgs(Project owner, DataObject context, boolean
if (owner != null) {
Properties prop = PythonUtility.getProperties(owner, false);
if (!prop.getProperty("nbproject.run.params", "").isEmpty()) {
params = prop.getProperty("nbproject.run.params", "")
.split(" ");
params = new StringTokenizer(prop.getProperty("nbproject.run.params", ""), StringMatcherFactory.INSTANCE.spaceMatcher(), StringMatcherFactory.INSTANCE.quoteMatcher()).getTokenArray();
}
}
if (owner != null && PythonUtility.isPoetry((PythonProject) owner) && !isDebug) {
Expand Down

0 comments on commit 4c76adc

Please sign in to comment.