Skip to content

Commit

Permalink
fixed ctrl-enter compilation
Browse files Browse the repository at this point in the history
In `run_haxe`, the build arguments have to be added no matter autocomplete or not.
  • Loading branch information
andyli committed Apr 14, 2015
1 parent 2968dad commit 79c97d7
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions HaxeComplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def _read_hxml( build, builds ) :
elif l.startswith( "--interp" ) :
currentBuild.target = "--interp"
currentBuild.output = ""
currentBuild.args.append( ( "--interp" , "" ) )
currentBuild.args.append( ( "--interp", ) )

elif l.startswith( "--run" ) :
spl = l.split(" ", 1)
Expand Down Expand Up @@ -1524,34 +1524,34 @@ def run_haxe( self, view , display = None) :
args.append( ("--display", display_arg ) )
args.append( ("-D", "st_display" ) )

if build.yaml is not None :
# Call out to `flambe haxe-flags` for Flambe completion
res, err = runcmd( ["flambe","--config" , build.yaml, "haxe-flags"] )
if err :
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")]
if build.yaml is not None :
# Call out to `flambe haxe-flags` for Flambe completion
res, err = runcmd( ["flambe","--config" , build.yaml, "haxe-flags"] )
if err :
print("Flambe completion error: " + err)
else:
args.append( ("--no-output",) )
output = build.output
if output is None :
output = "no-output"
#args.append( ("-cp" , plugin_path ) )
#args.append( ("--macro" , "SourceTools.complete()") )

args.extend( build.args )
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
if output is None :
output = "no-output"
#args.append( ("-cp" , plugin_path ) )
#args.append( ("--macro" , "SourceTools.complete()") )

args.extend( build.args )

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

0 comments on commit 79c97d7

Please sign in to comment.