Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue #13, #21. Added in a popup error message noteing that

it can't be installed via Package Control at the moment
  • Loading branch information...
commit eb4eb0025d56f0ef5ef5545dacf717a9cc0d4b89 1 parent 840cf41
@quarnster authored
Showing with 25 additions and 2 deletions.
  1. +25 −2 sublimejava.py
View
27 sublimejava.py
@@ -29,8 +29,31 @@
import os
import Queue
import threading
-from parsehelp import parsehelp
-
+try:
+ from parsehelp import parsehelp
+except:
+ def hack(func):
+ # If there's a sublime.error_message before a window is open
+ # on Windows 7, it appears the main editor window
+ # is never opened...
+ class hackClass:
+ def __init__(self, func):
+ self.func = func
+ self.try_now()
+
+ def try_now(self):
+ if sublime.active_window() == None:
+ sublime.set_timeout(self.try_now, 500)
+ else:
+ self.func()
+ hackClass(func)
+
+ def showError():
+ sublime.error_message("""\
+Unfortunately SublimeJava currently can't be installed \
+via Package Control at the moment. Please see http://www.github.com/quarnster/SublimeJava \
+for more details.""")
+ hack(showError)
scriptdir = os.path.dirname(os.path.abspath(__file__))
Please sign in to comment.
Something went wrong with that request. Please try again.