Skip to content

Commit

Permalink
fix #217, #175 and #205
Browse files Browse the repository at this point in the history
  • Loading branch information
roaoao committed Apr 12, 2015
1 parent de60e51 commit ce11a8d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions HaxeComplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,9 @@ def find_nmml( self, folder ) :
outp = mFile.group(2)
elif (tag == "haxelib"):
# temporary fix #175
if name == 'openfl':
currentBuild.libs.append( HaxeLib.get( 'lime' ) )
currentBuild.args.append( ('-lib' , 'lime') )
# if name == 'openfl':
# currentBuild.libs.append( HaxeLib.get( 'lime' ) )
# currentBuild.args.append( ('-lib' , 'lime') )
# end temporary fix #175
currentBuild.libs.append( HaxeLib.get( name ) )
currentBuild.args.append( ("-lib" , name) )
Expand Down Expand Up @@ -1531,6 +1531,18 @@ def run_haxe( self, view , display = None) :
print("Flambe completion error: " + err)
else:
args += [(arg,) for arg in res.split("\n")]
args.extend( build.args )
elif build.nmml is not None :
settings = view.settings()
haxelib_path = settings.get("haxelib_path" , "haxelib")
print(build.nmml, HaxeBuild.nme_target[1].split(" ")[0])
res, err = runcmd( [
haxelib_path, 'run', 'openfl', 'display',
build.nmml, HaxeBuild.nme_target[1].split(" ")[0]] )
if err :
print("OpenFl completion error: " + err)
else:
args += [(arg,) for arg in res.split("\n")]
else:
args.append( ("--no-output",) )
output = build.output
Expand All @@ -1539,7 +1551,7 @@ def run_haxe( self, view , display = None) :
#args.append( ("-cp" , plugin_path ) )
#args.append( ("--macro" , "SourceTools.complete()") )

args.extend( build.args )
args.extend( build.args )

haxepath = settings.get( 'haxe_path' , 'haxe' )
cmd = [haxepath]
Expand Down

1 comment on commit ce11a8d

@clemos
Copy link
Owner

@clemos clemos commented on ce11a8d Apr 13, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done :D

Please sign in to comment.