SDK plugins looking for developers

@normen said:
its in trunk/, just check out that and open it.


No wonder it wasn't there, I checked out the sdk part only. Now I've got that free-form project. :D I'll see tomorrow what I can do with the GLSL editor.

Thanks.
1 Like
@madjack said:
No wonder it wasn't there, I checked out the sdk part only. Now I've got that free-form project. :D I'll see tomorrow what I can do with the GLSL editor.

Theres the library of valid variables etc., it already has some jME3 things added but maybe that could be cleaned a little more.

The free-form project built successfully, but I’m having a couple of issues.



First, when I hit OK on the GLSL Editor’s property window (w/o changing a thing), I get the following stack dump:



java.io.IOException: Sections not separated by blank lines
at org.netbeans.modules.apisupport.project.api.EditableManifest$Section.(EditableManifest.java:380)
at org.netbeans.modules.apisupport.project.api.EditableManifest.(EditableManifest.java:113)
at org.netbeans.modules.apisupport.project.Util.loadManifest(Util.java:431)
at org.netbeans.modules.apisupport.project.ui.customizer.SingleModuleProperties.storeManifestChanges(SingleModuleProperties.java:1027)
at org.netbeans.modules.apisupport.project.ui.customizer.SingleModuleProperties.storeProperties(SingleModuleProperties.java:903)
at org.netbeans.modules.apisupport.project.ui.customizer.CustomizerProviderImpl.storeProperties(CustomizerProviderImpl.java:90)
at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$1.run(BasicCustomizer.java:162)
at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$1.run(BasicCustomizer.java:160)
at org.openide.util.Mutex.writeAccess(Mutex.java:436)
[catch] at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer.save(BasicCustomizer.java:160)
at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$OptionListener.actionPerformed(BasicCustomizer.java:183)
at org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener$1.run(CustomizerDialog.java:264)
at org.openide.util.Mutex.writeAccess(Mutex.java:397)

[ ... Many Other Lines ]


Also, 3 files in the dataobject package give me an error with "new PropertyChangeListener" parameter. The exact error is:

internal error; cannot instantiate () at to ()

I've cleared the cache hoping it would fix it, it didn't.

I can fix it by "Convert Anonymous to Member". At least the error goes away, but I haven't tried building the module so I'm not sure if that would work.

Please advise.

whats the exact issue? if the project builds then everythings fine. maybe the code scanning failed?

The good news is the first error doesn’t stop me from modifying the project’s properties (even if I don’t have to, it’s good to know it works with that error message).



As for the other “error”, it’s underlined in red at every instantiation of



[java]

new PropertyChangeListener(){

public void propertyChange(PropertyChangeEvent event) {

if("document".equals(event.getPropertyName())){

if(event.getNewValue()!=null)

{

support.getDocument().addDocumentListener(observer);

observer.runCompileTask();

}

else if(event.getOldValue()!=null)

{

// cylab: I think this is never called.

// But I don’t know if unregistering the observer makes any difference…

((Document)event.getOldValue()).removeDocumentListener(observer);

}

}

}

}

[/java]



The error message when I hover above it, as I wrote above is:

internal error; cannot instantiate () at to ()


As you suggest, I think the error is the code scanning, or something along that line.

The question becomes how can I fix that? I guess I could simply ignore it, but that could lead to other errors being outlined that aren't error...

The three files affected are:
GlslFragmentShaderDataObject.java
GlslGeometryShaderDataObject.java and
GlslVertexShaderDataObject.java

Edit: For the moment I've converted the above to a Member. At least that gets rid of the message. If we find a way to fix it then I'll revert those changes.

sigh



It seems either the download got screwed up or a lib isn’t included.



Now I’m getting an error saying that JAXB, mainly javax.xml.bind.annotation, does not exist.



I’ll restart from scratch and repost after it’s done.

Redownloading and rebuilding seem to have fixed the JAXB issue…



Going through the code I found these comments, could you translate what it means please (google translate wasn’t that helpful)?





prefix = doc.getText(paragraph.getStartOffset(), pos - paragraph.getStartOffset());

// daf�r sorgen, dass wir in den meisten f�llen einen korrekten prefix haben

// TODO: besser machen, ist ne hau-ruck-methode

// problem: bei leerzeichen in strings werden auch dort funktoren als autocomplete angeboten…

prefix = prefix.replaceAll(".?([\w-"])$", “$1”);

// make sure to have a correct prefix most of the time

// TODO: make it better, it’s an ad-hoc method

// problem: if there are whitespaces in strings, functions are also offered as autocomplete there…

1 Like

Thanks @survivor



Well, I’ve made a small change to the plugin and it seems to be working.



I’ve made all built-in global vars (g_…) being accepted by the syntax checker as “in” or “uniform” as they should be. Any other combination should technically produce an error.



The thing here is the plugin has many files which seem unused, so I’m not sure if the change above will apply to all versions. As a matter of fact, there are 2 “glsl version” files, 130 and 120, but I haven’t found any evidence that the shader’s version is even parse from the material definition (I’m pretty sure isn’t). So basically, the change I made would apply to all versions of glsl…



Considering this I’ll wait for approval before committing.

2 Likes
@madjack said:
Considering this I'll wait for approval before committing.

idk, can't you just try? remy added the g_WorldMatrix etc. stuff once, we use the jme-prefixed vocabulary for the syntax.
@normen said:
idk, can't you just try?

lol

I'll commit after I'm done with this post.


remy added the g_WorldMatrix etc. stuff once, we use the jme-prefixed vocabulary for the syntax.

That's what I'm using. Don't worry.
2 Likes

Looks good, seems like you made the thing your own pretty well, I had a hard time getting into it in the beginning ^^ Too bad the language description api it uses is deprecated but its going to stay in the NetBeans platform due to many requests and we have our own build anyway.

Yeah. It was like treasure hunting. Wasn’t obvious to find what was doing what at first, but nothing google couldn’t handle. :wink:



There might be some bugs but I think it’s a lot better now as it’s not generating errors for the basic jME global variables.

@madjack said:
There might be some bugs but I think it's a lot better now as it's not generating errors for the basic jME global variables.

Cool. Btw we are kind of an official fork, so feel free to go mad ^^

To be quite honest the only changes I wanted to make to the GLSL syntax plugin was to get rid of what I already took care of. Of course I can maintain it and fix bugs I might have introduced, but that was the initial intent.



Unless there is some maintenance to do I’m afraid I’m pretty much done with that one.



As for the Image Editor plugin… That’s another story. Now that I have that system working it shouldn’t be a problem to introduce more features, fix some issues, etc.



Anyway. If anyone has suggestions, feature requests, send them. I’ll see what I can do. :smiley:

@madjack said:
Now that I have that system working it shouldn't be a problem to introduce more features, fix some issues, etc.
Anyway. If anyone has suggestions, feature requests, send them. I'll see what I can do. :D

Integrating a bit more with the project would be nice, like saving to the assets folder by default etc. Also idk if the "new image" approach could maybe be substituted with a undo/redo and save as.. approach? :)
@normen said:
Integrating a bit more with the project would be nice, like saving to the assets folder by default etc. Also idk if the "new image" approach could maybe be substituted with a undo/redo and save as.. approach? :)


Yes to all that.

The first item is to make a Save button instead of having to right-click on the image's tab->Save image as this is very awkward and counter-intuitive. Once that's done I'll tackle the rest.

Note that development of this will take time as I spend most of my time working on Disenthral.

You don’t have to do that, just click the “Save” button in the top row. This is done via the SaveCookie. Its more about creating a new DataObject.

Just thought I would bump this, incase anyone is still interested in helping the unfinished tasks

1 Like

Just wanted to say that those plugins are a delight to work with. Shaderblowlib being a plugin was a very wise move. I haven’t started working with shaders yet, but having the lib so easy to update really makes it very convenient and gives lots of confidence… can’t wait to start playing with it.

1 Like