I have a couple of JavaScripts and I want to derive their UML diagrams from the JavaScript code.
I am using Eclipse Spring Tool Suite.
Can anyone tell me how can this be done? I tried using JS/UML plugin but was unable to do so.
I need the steps to follow to derive the UML diagram (especially sequence Diagram) directly from JavaScript code in Eclipse.
Thanks in Advance.
Download X-ray eclipse plugin in zipped format here: http://xray.inf.usi.ch/xray.php
Unzip to your eclipse plugins folder.
Then right click the project you want to analyze and click "analyze with xray"
Related
So I've started using VsCode over Atom recently and love it, the issue is I develop for software that uses its own JS API with no proper integration into anything.
I've started trying to implement my own autocomplete/intellisense structure using their pdf into VsCode to speed up my workflow, currently I'm simply using a JS file that is full of empty functions and objects with a bunch of JSDoc comments to help VsCode Intellisense identify what's what, that seems to be working fine so far but it means importing this "useless" file into every project I work on.
I looked into extending the JS language using a language server but that seems way too complex for what I need (plus it looks like I'd be building the entire Javascript language from scratch).
Does anyone have any recommendations ect?
Kind regards.
Edit
Sorry I also would like the ability for it to pass linting as right now it gets a bit funky with it.
You likely do not need an extension for that your example use case.
VS Code's intellisense for libraries is powered by .d.ts typing declaration files. The declaration files for the library you are using can either be written in your current workspace as you are currently doing, or—preferably—shipped with the library itself. Many npm modules ship their with typing definitions files, while other libraries have typing definition files provided by the community through DefinitelyTyped.
You alternatively bundle d.ts types file into as a separate npm package that you include in any project that needs them
I am new to creating plugins. I want to create an eclipse plugin for a new scripting language. And, its syntax is quite similar to JavaScript. So, I wish to extend existing Javascript plugin that exists in eclipse.
Please suggest how do I go about it. Mainly, I want to have editor functionality (syntax checking, auto completion and ctrl-click to go to hop across functions), no compiler/build is needed.
Also, where do I find the source code for existing JavaScript plugin.
The source of the JavaScript editor can be found in the http://download.eclipse.org/webtools/repository/kepler/ repository (assuming Eclipse Kepler). Look for the JavaScript Development Tools SDK.
You install this in to Eclipse using Help > Install New Software and the source is then available to read using Navigate > Open Type (you need to have Include all plug-ins from target in Java search selected in Preferences > Plug-in Development for this).
Eclipse editor code is very complex and it likely to be hard work to adapt it. You might find it easier to use something like Eclipse xText which is designed for developing support for new languages.
Goal
My goal is to get an UML model out of my JavaScript project (consisting of several .js files) and store it as XMI.
How far I've come
I searched the internet and found out js/uml is the first place to go.
I've managed it to get the js/uml plugin running with Eclipse 3.7.1 (Win32) and a local installation of my pre-downloaded additional plugins:
mdt-uml2tools-Update-incubation-I201103290512.zip (installs required org.eclipse.uml2.diagram.clazz 0.10.0)
jsuml-eclipse-0.8.4.zip (only works with Eclipse 3.7.1 (Indigo))
I loaded the provided example project jsuml-example-yui-0.8.4.zip into Eclipse and added all my .js files to this project also.
Problem
Now I'm stuck and do not get it how to call the reverse engineering of my .js files. I can call 'New'->'Other'->'UML 2.1 Diagrams'->'Class Diagram' from the project's context menu, but I don't get the following steps of that assistant dialog, nor do I get it if this is the right way at all. Please, could you help me with an easy understandable click tutorial? The js/uml homepage does not explain it well enough IMHO. Thanks for your help in advance.
Someone adapted UML for web artifact, its called the "WAE" extension of UML. This way you can see not only your javascript files but the html and css. If you work with node.js, i created a module that generate class diagram for javascript/node/html/css. Its called wavi. For javascript, function,variable are automatically recognized. You can use it for documenting your application.
https://www.npmjs.org/package/wavi
Well, I think I have come quite close.
There's a command-line tool called Code2Flow. which uses GaphViz to generate graphs for Python and JavaScript sources.
I tried it, it does generate the graphs but somehow i can't make to do right.
I hope this will help you or someone.
There's a Google Maps API v3 Visual Studio Intellisense Helper, which presumably works great for Visual Studio, but Aptana (based on Eclipse) uses a different JavaScript documentation format - ScriptDoc (.sdoc files). ScriptDoc is also the name of a VS utility to convert JS files with Intellisense comments into XML, just to confuse things.
I've tried adding the Intellisense files as file / global references in Aptana, but all this gives is completion for the word google and no completion or documentation in the google namespace.
Possible solutions:
Find someone who's already done this for Aptana. I've Google'd quite a bit already but couldn't find anything.
Convert the Visual Studio Intellisense Helper into a format Aptana can understand.
Scrape the API page and convert it into a format Aptana can understand.
Can't you put the JS file in the Project's references ?
I'm using Aptana and ScriptDoc is the worst decision they made and they seem to be attached to it, it's the main reason I have considered switching to Eclipse.
I've been thinking in using jsdoc-toolkit to generate .sdoc files from jsdoc notations (using some type of templates), but to use .sdoc files you must insert #id tags all over your code, and that discouraged me.
This helper is for Visual Studio. I don't think Aptana can work with vsdoc.js files
Aptana Plugin for Eclipse and jQuery code assist
I found this and I'm checking if it helps
http://code.google.com/p/closure-compiler/source/browse/#svn%2Ftrunk%2Fcontrib%2Fexterns%2Fmaps
I am trying to write my own Javascript Framework something like jQuery.
I use Aptana Studio for designing websites. I was planning to create a web page and write the Javascript code just as we would do for a website. Then I noticed that Aptana Studio also has a Javascript Project. So I created a new Javascript Project. But it primarily allows you to create only .js files and no HTML files. I wonder what a standalone .js file would do? Would't I need an HTML file to execute and test my Javascript code?
Certainly there must be some advantage to using the Javascript Project. But I am not able to figure it out. Can someone please explain how to use the Javascript Project?
I don't know anything about Aptana Studio, but I'm guessing that you're intended to drive your JavaScript project from another project. Think of the JavaScript project like a self-contained library. It doesn't make sense to include the test code in the library itself, because consumers of the library probably don't want to deal with it. Try creating a second project that imports your JavaScript project and allows you to play with it and test it.
I would recommend that you try Javascript-Test Driver. It has an IDE support and also it seems to be fairly good at helping you debug code. Find more details here:
http://code.google.com/p/js-test-driver/
I would say that while you DO need HTML files; you'd probably wanna do more according to the testing framework you choose; as some work with fixtures other loads up iframe and stuff. But I would presume that writing a whole framework would take more than just HTML pages and a unit testing framework would be more apt for the req.
Screw Unit for JS
http://github.com/nkallen/screw-unit
I know I have deviated from your question; but I just felt that rather than right project structure and HTML for testing what would be more important is a testing framework that keeps development agile and fast.
But that's just me.