HaxeFoundation / intellij-haxe

Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
http://intellij-haxe.org
Apache License 2.0
219 stars 101 forks source link

Can't Use Classes Inside Swf for Autocomplete #942

Closed CanIGetaPR closed 7 months ago

CanIGetaPR commented 5 years ago

Affected versions: 1.1 for IDEA 2018.x ,1.2 for IDEA 2019.x OS: Windows IDE: IDEA Ultimate 2019.2

The IDE sees the classes inside a swf but they are unresolved in my code.

image

image

So auto complete doesn't work. The program runs fine and finds the classes.

m0rkeulv commented 4 years ago

This does not make much sense to me. the way i see it these are classes from 2 different languages. Your code is Haxe code and SWF files contains Bytecode/actionscript, If you want to use Classes from a different language you will most likely have to declare them as externs somewhere, or try to mimic what openFl does with its Assets using @:bind and @:native. you cant just import them directly like your example above.

@:bind to overwrite the actionscript declaration when targeting flash/Air @:native("ClassName") does some kind of rewrite of the path to the class. More info here : https://haxe.org/manual/cr-metadata.html

CanIGetaPR commented 7 months ago

Natively supporting OpenFL's swf library is not currently planned.