accatyyc wrote:Hi! Is this plugin still being developed? I'm very interested in these functions, but I can't get it to work in the latest versions of ST2. I suspect its the new autocomplete functionality in ST2 that breaks it. Anyone know how I can fix it?
Traceback (most recent call last):
File ".\sublime_plugin.py", line 362, in run_
File ".\displayfunctions.py", line 34, in run
File ".\displayfunctions.py", line 91, in get_obj_type
File ".\displayfunctions.py", line 73, in get_return_type
IOError: [Errno 2] No such file or directory: u'C:\\workspace\\testing\\src\\main\\java\\com\\thing\\thing2\\thing3\\String.java'
def make_filename(self, classname):
this_file = self.view.file_name()
dir_len = this_file.rfind('/') # (for OSX)
if not dir_len > 0:
dir_len = this_file.rfind('\\') # (for Windows)
this_dir = this_file[:(dir_len + 1)] # + 1 for the '/'
this_dir = re.sub(r"\\test.*", r"\\main", this_dir) #added this to move back to main directory
for i in self.locate(classname + ".java", this_dir): #added this to find the class in the directory
this_dir = i
def locate(self, pattern, file_path):
'''Locate all files matching supplied filename pattern in and below
supplied root directory.'''
for (path, dirs, files) in os.walk(file_path):
for filename in fnmatch.filter(files, pattern):
yield os.path.join(path, filename)
Users browsing this forum: Google [Bot] and 6 guests