Skip to content

Commit d425ecc

Browse files
author
Sahar Mehrpour
authored
Merge pull request #19 from devuxd/supportLinux
support Linux
2 parents c91a36b + 237b0af commit d425ecc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ActiveDocumentationPlugin.zip

89 Bytes
Binary file not shown.

src/core/model/SRCMLHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class SRCMLHandler {
1717

1818
final private static String srcmlPathMac = "/usr/local/bin/srcml";
1919
final private static String srcmlPathWindows = "C:\\Program Files\\srcML 0.9.5\\bin\\srcml";
20+
final private static String srcmlPathLinux = "/usr/bin/srcml";
2021

2122
/**
2223
* Create a srcML xml file initially
@@ -97,6 +98,8 @@ private static String createXMLForFile(String path) {
9798
return runShellCommand(new String[]{srcmlPathMac, path});
9899
else if(System.getProperty("os.name").startsWith("Windows"))
99100
return runShellCommand(new String[]{srcmlPathWindows, path});
101+
else if(System.getProperty("os.name").startsWith("Linux"))
102+
return runShellCommand(new String[]{srcmlPathLinux, path});
100103
System.out.println(System.getProperty("os.name") + " not supported");
101104
return "";
102105
}
@@ -137,6 +140,8 @@ public static int findLineNumber(String fullPath) {
137140
src = runShellCommand(new String[]{srcmlPathMac, "--unit", "1", fullPath});
138141
else if (System.getProperty("os.name").startsWith("Windows"))
139142
src = runShellCommand(new String[]{srcmlPathWindows, "--unit", "1", fullPath});
143+
else if (System.getProperty("os.name").startsWith("Linux"))
144+
src = runShellCommand(new String[]{srcmlPathLinux, "--unit", "1", fullPath});
140145
else
141146
System.out.println(System.getProperty("os.name") + " not supported");
142147
//File filePath = new File(fullPath);

0 commit comments

Comments
 (0)