Skip to main content

Eclipse ganymede and jmaki project

7 replies [Last post]
lilos
Offline
Joined: 2008-09-19
Points: 0

Hi all,
I am developing a jmaki webapp using Eclipse.

The Eclipse Ganymede Javascript validator marks as errors the calls:

jmaki.doSomething()

For instance, given the following piece of code:

jmaki.namespace("jmaki.widgets.mywidget1");

The error eclipse prompts is:

Cannot make a static reference to the non-static function namespace(any, any) from the type Jmaki

I have tried to configure jmaki.js as a javascript library but the error persists.

Does anyone solved this problem?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lilos
Offline
Joined: 2008-09-19
Points: 0

Hi Greg,
it's strange... with the 1.8.1 plugin the result is that the jmaki variable is undefined to the javascript validator.

I have tried to adjust the javascript libraries settings but having no success.

yummychen
Offline
Joined: 2008-04-07
Points: 0

Hi Greg :

I have used your 1.8.1 plugin. But when i want to drag widget and drop into jsp. It doesn't work. The following is the error message :

How can i do to fix this problem?
Thanks

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi,

The template for html wasn't there for that widget. We have verified all the templates for html in the latest build.

Can you try the template now?

I've updated the plugins (10/31/2008) yesterday.

See: http://jmaki.com/eclipse for the latest.

-Greg

gmurray71
Offline
Joined: 2003-07-31
Points: 0

I'll look into this but I suspect it has to do with Ganaymede not doing it's JS check based on the assumption that the jMaki object is created.

If you look at the bottom of the jmaki.js you will see we are creating an object:

if (typeof jmaki == 'undefined') {
var jmaki = new Jmaki();
jmaki.widgets = {};

var oldLoad = window.onload;

/**
* onload calls bootstrap function to initialize and load all registered widgets
* override initial onload.
*/
window.onload = function() {
if (!jmaki.initialized) {
jmaki.initialize();
} else {
jmaki.bootstrapWidgets();
return;
}
if (typeof oldLoad == 'function') {
oldLoad();
}
}
}

I might need to report an eclipse bug ;-)

I've been doing extensive re-writing of the jMaki Plugin for Eclispe.

The docs are a little weak but you can give it a try at:

http://jmaki.com/eclipse

I would be interested in any feedback before we put this on our update center. Your feedback would be very helpful.

-Greg

lilos
Offline
Joined: 2008-09-19
Points: 0

Thank you for your answer Greg.

I already noticed that the jmaki.js creates a global scoped object called jmaki but eclipse (at least with the jmaki 1.8.0 plugin) doesn't like to reference to the global object.

I will try the 1.8.1 plugin and give you feedback.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

I look forward to the feedback.

lilos
Offline
Joined: 2008-09-19
Points: 0

Hi Greg,
I have been away for a while... but now here I am again.
I will try the new plugin today and report feedback.