Skip to content

Commit 67e464c

Browse files
committed
No need to call into java for the path separator.
1 parent 0c9b3f2 commit 67e464c

4 files changed

Lines changed: 10 additions & 19 deletions

File tree

SublimeJava.class

-71 Bytes
Binary file not shown.

SublimeJava.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,6 @@ public static void main(String... unusedargs)
408408
System.err.println("quitting upon request");
409409
return;
410410
}
411-
else if (args[0].equals("-separator"))
412-
{
413-
System.out.println(System.getProperty("path.separator"));
414-
continue;
415-
}
416411
else if (args[0].equals("-findclass"))
417412
{
418413
String line = null;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"description": "Java completions for Sublime Text 2",
77
"author": "Fredrik Ehnbom (quarnster)",
88
"homepage": "http://github.com/quarnster/SublimeJava",
9-
"last_modified": "2012-07-05 17:32:00",
9+
"last_modified": "2012-07-05 20:25:00",
1010
"platforms": {
1111
"*": [
1212
{
13-
"version": "1.1.6",
13+
"version": "1.1.7",
1414
"url": "http://cloud.github.com/downloads/quarnster/SublimeJava/SublimeJava.sublime-package"
1515
}
1616
]

sublimejava.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ class SublimeJavaDotComplete(completioncommon.CompletionCommonDotComplete):
5959
class SublimeJavaCompletion(completioncommon.CompletionCommon):
6060
def __init__(self):
6161
super(SublimeJavaCompletion, self).__init__("SublimeJava.sublime-settings", os.path.dirname(os.path.abspath(__file__)))
62-
self.javaseparator = None # just so that get_cmd references it. It's set "for real" later
63-
self.javaseparator = self.run_completion("-separator").strip()
6462
self.regex = [
6563
(re.compile(r"\[I([,)}]|$)"), r"int[]\1"),
6664
(re.compile(r"\[F([,)}]|$)"), r"float[]\1"),
@@ -96,16 +94,14 @@ def get_packages(self, data, thispackage, type):
9694
return packages
9795

9896
def get_cmd(self):
99-
classpath = "."
100-
if self.javaseparator != None:
101-
classpath = self.get_setting("sublimejava_classpath", ["."])
102-
newclasspath = []
103-
window = sublime.active_window()
104-
for path in classpath:
105-
newclasspath.append(self.expand_path(path, window))
106-
classpath = newclasspath
107-
classpath.insert(0, ".")
108-
classpath = self.javaseparator.join(classpath)
97+
classpath = self.get_setting("sublimejava_classpath", ["."])
98+
newclasspath = []
99+
window = sublime.active_window()
100+
for path in classpath:
101+
newclasspath.append(self.expand_path(path, window))
102+
classpath = newclasspath
103+
classpath.insert(0, ".")
104+
classpath = os.pathsep.join(classpath)
109105
return "java -classpath %s SublimeJava" % classpath
110106

111107
def is_supported_language(self, view):

0 commit comments

Comments
 (0)