JmeAssetLinkNode doesn't recognize tool actions

I’ve made a tool in my plugin so that when a spatial is moved around in the scene composer, it stays “locked” to the terrain. It works pretty well with any type of spatial. However, I discovered that the SDK dosen’t give me the option to use my tool, or any tools in fact, on AssetLinkNodes. Is this a bug in the SDK?

Currently I have my getNodeClass() inside my AbstractToolAction as follow:

@Override
public Class<?> getNodeClass() {
    return JmeSpatial.class;
}

This should work, since JmeAssetLinkNode extends JmeNode. But even replacing JmeSpatial with JmeAssetLinkNode dosen’t give me any tools menu.

Looks like the AssetLinkNode doesn’t add menus for new Spatials or Tools, only controls.

See
https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeAssetLinkNode.java
compared to
https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeNode.java

Hmm well then. I guess I can temporaily get around this issue by attaching the AssetLinkNode to a dummy node so that then I’ll be able to do what I want. But in case I wanted to add the functionality of a tool menu to JmeAssetLinkNode, is there any reason in particular that there is no tool menu currently?

I don’t think so but these parts of the code were changed by a few people by now. @nehon? Any specific reason for this?

Well, the question is more for @Sploreg I guess, but IMO it’s just and overlook and things were not added to AssetLinkNode when they were done for the JmeNode.
There is no reason it’s not there, so it can be added IMO.

Ok perfect. Thanks a lot for the info!