As i installed the jmonkey sdk and started to code stuff, i have noticed that whenever i would like to see more info about implementation of certain things i would control click on classes i could view the source. Unfortunately there is no way for me to actually ctrl click on anything inside of the window that opens from the previous action, saying that the action could not be completed. Is there any way around this? I would like to be able to freely navigate the source code. Also it would be neat if i could get some tips on setting up jme source code along side the game code so that i could extend the engine as i code the game.
Idk, I can do that? What exactly do you try to do and how does it fail? Anyway from the next version on you can attach any source if you somehow manage to land somewhere where you see compiled code instead of source.
I don’t think hacking the engine is a good idea personally (you most probably do something wrong if you want to do that= but heres instructions as per your request: https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:use_own_jme
These pages are also available through the manual in the SDK (F1).
Thanks for the quick reply.
The problem exactly is if for instance i want to implement my own Application, i would like to see first how the SimpleApplication is implemented inside of the simple application i would like to see how StatsAppState is implemented, well if i ctrl+click on that particular class it wont let me go to the declaration or the source, with status line saying cannot perform the goto declaration here. Now if i import it into the class within my project i can ctrl +click on that particular class no problem.
Also the my own jme thing is just in case, because there is no way any engine has absolutely everything i need to implement a game, so i would like that option just in case i want to improve the cut scene handling for instance, or add a different way to handle animations, although i wont know specifically what i will need until i get there.
You can extend the engine in every way without needing to hack it really.
What about the code browsing thing? Is there something i am doing wrong?
An update i opened the same project in normal netbeans and what i described for code browsing works just fine, while in jme it does not. I also tested for this on my linux computer and it also does not work on it as well.
Yeah, I see the issue.
Just opening the project in NetBeans should result in an error that the libraries are not available first of all, probably your way to work around that changed something (like you put all jars in one library entry or so). Apart from that theres not much that differs between the jme libs and normal netbeans libraries. Also consider the SDK runs on NetBeans Platform 7.1.
I can confirm that I have this problem to.
- Create New BasicGame
- Right Click the SimpleApplication class name in the editor -> Navigate -> Go To Source
- SimpleApplication class opens
- RightClick the Application class name (in the SimpleApplication file) in the editor -> Navigate -> Go To Source
- Nothing happens
Idk if this is something I’ve messed up or if there is something I need to change.
Yes, I have this trouble too.
It seems that it cannot follow in-package dependencies.
What I mean is :
- it there is some “import”, ctrl-click works nicely
- if there isn’t, jumping from one class to the next is not possible => you have to browse the JAR file and open the class file right from there
Two additional things :
- ctrl-clicking on a method often bring us to the top of the class… not the clicked method
- maybe unrelated (?) but deboging sometimes make strange things. Yesterday I was tracing into ImagePainter to debug some transparency trouble… And I saw that it did not trace the right method !!! => paintImage instead of paintPixel ???
Please note that all these trouble do not happen for in-project files.
I guess the imagepainter source doesn’t fit the library.
Hmm, I suppose it’s technically possible for the ImagePainter source to be out of date from the jar, I don’t see how it would happen though. In fact I just checked and the source jar checked into source control looks correct from here.
I have a solution to this problem. You need to expand the source jar file (jMonkeyEngine3-sources.jar) provided in the libs directory located within the installation directory (C:\Program Files\jmonkeyplatform\jmonkeyplatform\libs). Expand the src jar into a ‘src’ folder and reference the folder by editing the ‘jme3’ entry in the project’s properties > Libraries > Compile-time Libraries list.