What is a good StringTemplate plugin for Eclipse, so i can do cod gen? - eclipse

I'm working on a eclipse-based model-based tool. I am not using UML/SysML but i created my own DSML (= component architecture, whereby components have a behavior, modeled using state automatons).
What I want to do now is to be able generate code and some config files from this model. So the question is: are there any good plugins out there, which would support that? (Tutorials wouldnt hurt either)
I did something similar in tool MPS (by jetbrains). It offers a string template language, that can be used for code gen. It would be cool to find something similar to it.
There is a plugin called StringTemplateDT in the eclipse market place. Does anyone have any experience with that?
best and thanks
Jenny

Give JET (Java Emitter Template) a try, it was relatively easy to pick up.
http://www.vogella.com/tutorials/EclipseJET/article.html

Related

UML tool for reverse engineering an eclipse project

I am currently working on a project in Eclipse but the problem is that this project is very big (a lot of codes, classes, packages, etc) and undocumented. Since, the project is written in Java, my idea was to make a reverse enineering of the project to see his architecture in UML. Do you know an eclipse plugin who can complete this task very easily? Thanks for your answer !!
I think MoDisco is what you are looking for ( here for a short intro)
It seems that the question is dealing with Eclipse plugin therefore Modisco and StartUML are not a possible choice because they are either not a graphical class diagram viewwer or an Eclipse plugin.
The tools that I have evaluated and selected are:
Topcased can reverse a project and gives an UML view. The reverse is good even if not recursive. I mean that you can detect only object having their own information such as class, interface, package, method and attributes but you can not detect calls between classes because this require a recursive reverse.
eUML will give you a visual class diagrams and the possibility to navigate but no model only EMF tags inserted inside your own code. I like the visual representation of the class diagram but having EMF tags in my code is too intrusive !!
You can try RSA which is a pretty good reverse having a real UML model but you will also get EMF tag in your code
The best for me and with no doubt is EclipseUML Omondo with no tag in the code and a high quality UML model but it is really too expensive !!
I'd advise StarUML or StavrUML, the unofficial fork. It reverse engineers code compliant with Java versions before 1.6 or something. Yes, the project was abandoned years ago, but the UML editor remains incredibly strong and powerful.
However, I'd avoid using reverse engineering a UML diagram. You'll probably get an unreadable mess out if it. Just get stuck in and make it manually :)
I'm sure you can find a suitable tool for your needs if you check these.

Is it a good idea to develop an IDE for scala?

I have to choose a sizable (but not too sizable!) project for my next & last term in university. I thought maybe a nice IDE for scala is what the world might need right now :).
Would you like to see an IDE specifically made for scala? Or are you more comfortable using (the already available) plugins for popular (mainly java) IDEs & editors?
What do you think about the whole idea?
P.s. I'd make it open source & would add features one by one, so if it doesn't end in one semester, it won't be a problem from the university perspective.
Actually, not anymore. IntelliJ, Netbeans and Eclipse all have Scala-specific efforts that have more man-hours in it than you could possible start to begin putting in at a last term. And there's two very interesting efforts that were results of projects like that, both of which were made to contribute to any IDE effort: ENSIME and Scala Refactoring.
And, beyond these efforts, most programming editors, such as jEdit or TextMate, also have some Scala support to one degree or another.
So, really, contributing to one of these projects might be a good idea, but making a Scala IDE is not.
For his Masters thesis, Mirko Stocker contributed the refactoring functionality to the Eclipse Scala plugin, see:
http://misto.ch/scala-refactoring-talk-at-scala-days-2010/
Instead of creating an IDE from scratch, why not contribute a major piece of functionality to the Eclipse plugin, all contributions are welcome. For ideas, see tickets.
Or instead of reinventing the wheel.. you can contribute..
http://wiki.netbeans.org/Scala
But I am not sure if it will be somehow enough for your university work. At the same time, as you see, those plug-ins still require a lot of work.
While writing your own IDE you will just trying to solve problems that were already solved and tested. Besides, even if - what kind of IDE is that, which allows you to do
Scala (even if its great) only. So just for simple xml edit of ant file or whatever you will need another tool.
I think Brian Clapper already summed it up nicely.
I'd suggest something like CheckStyle but for Scala might go down well and be reasonable to tackle as a project.
Not a Scala developer but an Eclipse plug-in would probably be a worthy senior project.
Concur. Operating systems, text editors, and IDEs...does the world really need more of them? No. But everyone wants to write one.
If you want to do something useful, as opposed to simply academic, develop an extension for an existing IDE. Eclipse, NetBeans, Komodo, etc. are all nicely extensible through plugins.

Good idea / Bad idea (/other ideas ?)

I have recently been asked to make an Eclipse Rcp view that would be "pretty".
In that purpose I had fist looked at Java2D (after my boss advised me so) before the client's query turned to be more like
"It would be smooth if you could do some flash or something ..."
From there JavaFx seemed appealing to me however I never had a chance to use it before. I then were wondering if before to dive "head first" anyone (who would have preferably used it seriously) had any advice, warning or any constructive comment to do about using this product in an RCP view (so based on SWT).
I really long to know if JavaFx meets it's promises.
Thanks in advance and have a good day !
[EDIT]I dont want an Eclipse Fancy skinning or to make views appear with light effects or in a CompizFusion way,
What I want is to display fancy animations and pretty visual effects within a specific view that will be called sometimes. (Sorry I wasn't clear in the first place :s)[/EDIT]
*I'll pass on the "What's pretty and what's not ?" and other "Tastes are a personnal thing" debates, here "pretty" simply means to qualify a view containing convoluted transparancies and subtle animations ...
Eclipse RCP can also be customized in the way it looks, e.g. when you dont want to have the Eclipsi-L&F. Its called Presentation API, I saw a quite amazing UI once in a presentation but I cannot find it right now. Anyway, I just want to point you the direction, since I personally havent used this API (yet).
There are also some "skins" available for download.
Nebula
MP3 Manager
EDIT: Just found the slides. It goes quite into detail, but when you have a look at the last slide...it doesnt look like the Eclipse you know :-)
JavaFX uses Swing as default layout engine, so you'll gain nothing using it rather than Java2D.
On the other hand, using either your home-grown toolkit or Swing is generally a bad idea when working with Eclipse, as it already embeds the SWT toolkit. The main advantage of SWT over Swing is that it use the OS native widgets. Using another toolkit will lead to the following issues:
Poor integration with Eclipse look&feel.
Poor integration with Eclipse views and editors management.
The answer is simple. No, you can't use JavaFX yet. The problem is that JFX script can't be embedded into Swing nor Eclipse SWT. We already know about such an issues. (The is some kind of hack how to embed JFX into Swing APP only.)

Time to develop an option in Eclipse to modify a Java file source

I'm evaluating the possibility of developing an Eclipse plugin to modify the source code of some Java files.
The Eclipse plugin should:
add one menu option or context menu option to launch the modification process.
add a key binding
only alter the UI in that way when an editor has been open on a Java file.
the modification process would not open a dialog, or maybe, a very simple one.
the modification process would traverse the AST of the Java file and would modify it.
Considering that we have no experience with Eclipse plugins and we need spend time in reading docs, how much time do you estimate in developing that plugin?
Thanks in advance.
It's really not that difficult at all... I had students in my design patterns class doing it for an assignment (adding/removing javabean getters and setters)
See http://help.eclipse.org/ganymede/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_manip.htm
[EDIT: added the following article reference]
And a great article on it at http://www.eclipse.org/articles/article.php?file=Article-JavaCodeManipulation_AST/index.html (from 2006 -- there may be a few API changes since)
Yes, writing plugins takes a little getting used to, but so does any API.
And you can modify the AST -- see the page I reference above.
(I should note that the above link is from the eclipse help, which can also be accessed via Help->Help Contents inside Eclipse -- there's a lot of good info in there, but it's just a starting point)
You'll probably spend quite some time cursing the complexity of the eclipse plugin system. There are some example plugin development projects that can be very helpful if they cover the area you're working in.
I'd say you're looking at 2-4 days of work, spent mainly getting familiar with the platform - someone with a lot of experience writing eclipse plugins would probably take no more than an hour.
However, your step 5 could be tricky. I don't know how easy it is to access and change the Java AST; my experience is based on developing an editor plugin for an exotic file format rather than Java code.
Well, the four first points are easy to achieve, even by monkey coders that look at the eclipse PDE documentation shipped with Eclipse. These can be achieve in 1 day of work, maybe 2.
The hardest point is really the fifth one and the kind of modification you expect to do. Acting directly on the editor content is simple, accessing the editor internal AST and modifying it is really a bigger challenge and I doubt that it could be achieve in less than a week by unexperimented people (it can take longer, depending of what kind of modification you want to apply).

Are there any user interface prototyping tools for Eclipse?

I am looking into designing new features for Eclipse-based programming tools, from the requirements/ideas perspective. To really do this quickly, I would like to sketch UI elements without having to code things -- my concern is with the concepts and ideas right now, not the possible later realization. Are there any such graphical sketching tools for Eclipse?
(on a side note, I should also note that I find Eclipse a better idea every day, in the way that you can combine partial systems from very many different sources into a single environment. It really is the future of IDEs, especially for embedded systems. It used to pretty horrible pre-Eclipse-3.0, but now it does seem to work)
WireframeSketcher is a tool that helps quickly create wireframes, mockups and prototypes for desktop, web and mobile applications. It comes both as a standalone version and as a plug-in for Eclipse IDEs. It has some distinctive features like storyboards, components, linking and vector PDF export. Among supported IDEs are are Aptana, Flash Builder, Zend Studio and Rational Application Developer.
(source: wireframesketcher.com)
Incidentally, NetBeans is known for having a really good GUI editor (Matisse), but I realize that you weren't asking about NetBeans :)
I've tried the Visual Editor Project before, but in the past it crashed my instance of Eclipse, and I haven't visited it since.
Jigloo is a new one that I'd like to try out soon.
This is really specific to Eclipse: it is the platform of choice for general IDEs today, and I am looking to sketch out extensions to it. The target programming language is more likely to be raw assembler and C than anything else -- OS, driver, system-level debug.