Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: mcoletti on May 17, 2013, 01:25:14 am
-
Hi, I am developing some code in Google Apps script. I have several javascript sources. Is there a way to import them in EA? This could help saving some manual typing time.
Regards,
Massimo
-
I also need that feature since parts of our product (web interface) is written in JavaScript. And the JS/UML plugin for Eclipse does not work.
-
The problem with Javascript is that even when written as object oriented it doesn't really match the way we expect object oriented code to look. I'm not even 100% sure we could write a parser to detect the class definitions etc. in a consistent way.
-
js/uml (http://jsuml.gaertner-network.de/) seems to restrict to JavaScript that is written in the styles of JSDoc, Dojo, or YUI. I think that way can be a good compromise. Usually a programmers decides for a known pattern to code object-oriented, and so the parser can decide as well, maybe using information given by user settings.
A class here is usually written like this:
var Foo = new (function () {
var m_fooParam = 0;
...
this.setFooParam = function (fooParam) {
...
};
this.getFooParam = function () {
return m_fooParam;
};
...
});