Code completion for Assets in SDK!

Home Forum Troubleshooting jMonkeyEngine SDK Code completion for Assets in SDK!

This topic contains 19 replies, has 13 voices, and was last updated by  lukasz 1 year, 4 months ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #200989
    +12

    Normen Hansen
    2778p
    Keymaster

    Sooo..

    Cleaning up and extending some other things in the SDK I came around to add this long planned and much requested feature :D





    Currently supported:
    – .loadModel(”
    – .loadMaterial(”
    – .loadTexture(”
    – .loadSound(”
    – .loadFont(”
    – .loadFilter(”
    – .fromXml(”
    – .addXml(”
    – new Material(.. ”
    – new AudioNode(.. ”

    So its basically looking for “.loadModel(” and then doing everything (matching etc) from the last quotation mark to the caret. Works just like the other code completion :)

    Please hit me with other situations where this can be used, I can’t come up with all off the top of my head.

    Cheers,
    Normen

    #200993

    pspeed
    3024p
    Keymaster

    Tricky. :)

    #200997

    Normen Hansen
    2778p
    Keymaster

    Yeah, scanning the class structure would be overkill, for now its simple text checks for the common situations. ^^ Lets see where and if I can add a generic way to open a list, like with a code generator or so.

    #201024
    +1

    Laurent
    83p
    Participant

    Oh my god !!!! This is simply marvelous.
    If you knew how many times I had missed this one !

    So many thanks, @Normen !!!

    #201027
    +1

    nehon
    1850p
    Keymaster

    Ho! awesome \o/
    This is gonna be soooo handy!!!
    Thanks @normen

    We have to do something for those icons though!

    #201035
    +1

    kwando
    264p
    Keymaster

    This is really sweet! But nowadays I know I can spell Common/MatDefs/Misc/Unshaded.j3md in my sleep =P

    It would be nice if completions worked in j3m/j3md files also (though I suspect most users do not touch them, and those who do know their paths =P).

    Also, the auto completions in .vert and .frag files is not that good either.. do you know where to find the syntax files for those, I’d like to see if I can improve them =)

    #201037

    Normen Hansen
    2778p
    Keymaster

    @kwando said:

    It would be nice if completions worked in j3m/j3md files also (though I suspect most users do not touch them, and those who do know their paths =P).

    Also, the auto completions in .vert and .frag files is not that good either.. do you know where to find the syntax files for those, I’d like to see if I can improve them =)

    Those are completely different things. This is about files. I outlined in the unfruitful “SDK plugs look for adopters” thread how to extend the shader syntax.

    #201038

    kwando
    264p
    Keymaster

    @normen
    There is paths in j3m and j3md files, and I think those is the same thing.. the other stuff I mentioned is different I know, but it is still autocompletion.
    VertexShader GLSL100 : Common/MatDefs/Misc/Particle.vert
    FragmentShader GLSL100 : Common/MatDefs/Misc/Particle.frag

    #201039
    +1

    haze
    64p
    Participant

    GREAT !!!

    How many times i missed images name or materials paths …
    Thank you Normen !

    #201041
    +1

    carpentier.ch
    15p
    Participant

    Level up! Productivity increased by 42.

    Can this be added in other editors? Like maybe in the material editor, propose completion on textures pathes? (Just giving out ideas, I’ve myself seldom used this editor, I use procedural thingies for everything).

    #201042

    nehon
    1850p
    Keymaster

    uh…the material editor has a “browse” button for each texture.

    #201046

    Normen Hansen
    2778p
    Keymaster

    @kwando said:
    @normen
    There is paths in j3m and j3md files, and I think those is the same thing.. the other stuff I mentioned is different I know, but it is still autocompletion.
    VertexShader GLSL100 : Common/MatDefs/Misc/Particle.vert
    FragmentShader GLSL100 : Common/MatDefs/Misc/Particle.frag

    Ah, I thought you mean complete material parameters in the SDK, like setColor(“Color”). I guess adding it to j3ms and j3mds for *editing* those should be no problem.

    #201047

    kwando
    264p
    Keymaster

    Yeah, I just thought about the paths in the j3m/j3md files. Completing material parameters (as you suggested) would be harder I think, since that requires access to the parse three / AST and a whole lot of other stuff.. but it would definitely be cool =P

    #201052

    Normen Hansen
    2778p
    Keymaster

    @kwando said:
    Yeah, I just thought about the paths in the j3m/j3md files. Completing material parameters (as you suggested) would be harder I think, since that requires access to the parse three / AST and a whole lot of other stuff.. but it would definitely be cool =P

    Hehe, yeah, wanna have a whack? I have the code to access the class structure of the java file here, you could even check via object type ;) But j3md support is something definitely possible, j3m less so as the text editor for them is (atm) not a “real” NetBeans editor. Maybe in the next iteration of the material editor, @nehon and me will collaborate on that one :) Thanks for the input!

    #201061
    +1

    loopies
    74p
    Participant

    Normen is on a roll :).

    I’ve never once managed to write the correct pathname to an asset… this is nice, instead of having to launch the game to get the usual asset not found exception.

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.