HaxeFoundation / intellij-haxe

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

Adding/querying haxelib libs automatically #563

Open b005t3r opened 7 years ago

b005t3r commented 7 years ago

I have a number of libs installed using hexelib, but to make auto-completion work I need to add them to IDEA's project manually. It'a OK, I think I even prefer that over parsing the HXML file and adding those automatically without my knowledge, BUT I'd like to be able to select the lib I'm after by its name and version somehow instead of having to find it on my disk (and having to edit it's name after it's added, because the name is always a version number or "git").

EricBishton commented 7 years ago

OK. What version of the plugin are you doing this with? What is your project configuration? (We look for haxelibs differently depending upon your compile settings.)

We've actually got code in there to find your haxelibs and put them in the project for you. It has a few issues, mostly with being overly aggressive.

b005t3r commented 7 years ago

OK, versions: IDEA 14.0 plugin 0.10.1 haxe 3.4.0 haxelib 3.3.0

I use HXML file project configuration (it's the only one Flash debugging works with), here's my HXML file:

# required libs, heaps is needed for hxsl
-lib hscript

# main class to run
-cp src
-main Main

# debugging settings, -D fdb is required for having trace() output in the console
-debug
-D fdb

# AS3/AIR specific settings, make sure swf-version is equal or lower to the one set in the appDescriptor.xml
--flash-strict
-swf-header 800:600:60:333333
-swf-version 22

# create the script that we'll use for running the project
# first output the ADL path - this needs to be edited depeneding on where Flex+AIR SDK is installed
-cmd mkdir -p out
-cmd echo "/Users/booster/Documents/Flex/flexsdk4.15.0air23/bin/adl `pwd`/appDescriptor.xml" > out/run_swf
-cmd chmod +x out/run_swf

# output file
-swf out/content.swf

It's of course possible that I'm doing something wrong, but I never had libs added automatically to a project.

b005t3r commented 7 years ago

I just realized I never gave you access to a project that exposes this bug, here it is: https://github.com/b005t3r/TexturedCube3D-hx