Making a DSL and an interpreter in Eclipse? - eclipse

i have to do a DSL and an interpreter of it using Eclipse modeling framework i think so , because i dont have a lot of information about it . I have four months to do it and i am very lost .
The DSL have to read files from sensors , and with the DSL you can make complex math operations . Anyone one know any free resource/book/tutorial/guide where i can read about that ( i can't find anything useful) or anyone can tell my some clues to follow and how start . Thank you so much.
I try to find some examples doing someting like that and i can't find anything.

Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit and EMF: Eclipse Modeling Framework (2nd Edition) are two great books on this topic that you can get used for about five dollars each. While not free, they are well worth the small price. There is also a newer reference Implementing Domain Specific Languages with Xtext and Xtend that seems very relevant but I have not had the pleasure of reading it yet, so can't vouch for it.
There are also many free talks on these subjects on youtube and all the EMF, Xtext, etc. websites have quite a bit of tutorials.
Also, based on this question: Interpreter vs. Code Generator Xtext , Xtext does not appear to support interpreters but Xbase may.

There are examples of using XText to build an interpreter / interpreted language (eg. https://eclipse.org/Xtext/documentation/202_scripting.html).
For me, it took a while to get all plugins configurations correct, but it is well documented, on Xtext web and in github / tutorials.
Also, look at XTend (http://www.eclipse.org/xtend/) as this is a major birck in XText framework.

Related

Eclipse 4 RCP (aka E4) documentation

Is there at least anything other than Vogella's tutorials and his book, which is completely based on those tuts? Examples from his repo are often either incomplete/unfinished/won't run and those examples even don't match the book actually..
I'd like to find at least some javadoc for this, because any step to a side and I'm completely lost on how to accomplish different tasks and what functionality is available.
Lars Vogel's Tutorials are the most complete and up-to-date documentation on Eclipse 4 development. Second to this is asking questions in Eclipse 4 Community Forum. Last option is to google for specific technical problems, which will in most cases lead you to blog posts from the same people that are active on the forums. (Mainly single supporters like Lars, some Eclipse devs and the guys from www.eclipsesource.com)
I discourage using the wiki, since much of the information may be outdated and may be more confusing than an actual help. Documentation for JFace and SWT can be reused from Eclipse 3.x since there are few to none changes in Eclipse E4.
E4 is alive and many of its components are now encapsulated in the standard Eclipse Platform. So most of Eclipse 3 docs and books are still relevant, as well as the Eclipse 4 ones.
If you want to understand the theory, you should start searching Eclipse conference slides explaining the Eclipse Platform and plug-ins. Trust me, it might sound old-style, but most of the times I find an EclipseCon Powerpoint or PDF, it is a great presentation, concentrating in 30 minutes the great work of some of the best Eclipse developers. If I had to re-start learning Eclipse, I would start again from some EclipseCon slides talking about Eclipse Plugins and Eclipse E4 Model.
For Eclipse4 or E4, we mean the Eclipse4 Model, which is now part of the Eclipse Platform. The Eclipse IDE itself supports both 3.x and Eclipse4 programming.
If you want to start Eclipse4, you should take a good book or a tutorial and follow it step by step. As an example you have these books:
Eclipse RCP (Rich Client Platform) 2nd edition
Contributing to the Eclipse IDE Project (free ebook)
Eclipse 4 Plug-in Development by Example: Beginner's Guide
Instant Eclipse 4 RCP Development How-to
However, there are a lot of sources of information, as many books, web tutorials and blogs. You can find most of them here:
https://wiki.eclipse.org/Eclipse_Articles,_Tutorials,_Demos,_Books,_and_More
https://wiki.eclipse.org/Eclipse4/Tutorials
http://planeteclipse.org/planet/
In my personal list of who to follow, I could include: Vogella RCP, EclipseSource, Tom Schindl, OpCoach, RCPVision, Kai Toedter, AllBlue, Wim Yongman, and all the E4 Contributors who are writing articles. But it is unfair not to mention all of them.
If you're not satisfied by docs and tutorials, please file a bug to the Eclipse Platform; mention "missing documents to use E4" and specify what you need. The Platform UI team will take care of this, either by linking the existing documentation to the above wiki page or by creating the missing docs.
Note: Several of the developers of the Eclipse E4 and Platform team contributed to the success of the technology by fixing bugs, writing code, documents, tutorials, and opening businesses based on this.
Eclipse committers are writing most of the existing documents, and they usually go to conferences. So, usually, you get their very best at the Eclipse Conferences. If you get their slides, you can get the best of some Eclipse and Java Champions, condensed in 30 slides, or in a video of 30 minutes.
You can start contributing to open source, by following tutorials, like those written by Eclipse Committers, and then you can give back by writing documents to capture your achievements ;)
But, keep in mind that a tutorial is not a book. There is a different process behind. Thankfully those great developers found the time to write code and documentation at the same time.
i was in the same position for my sparetime RCP-Project and was about to give up
since Neon the situation has been improved a lot
my approach
take the tycho-Example from vogella for headless-build
add your custom parts with 'hello world' and play around to learn
for database-access use a declarative Service using jpa
an example will be
http://relations-rcp.sourceforge.net/
for logging and error-view
https://github.com/buchen/portfolio
this project eye-opening!
in general:
search Application.e4xmi in Github by date descending and you will find excelent examples and full working products
Forget about e3 and stick to plain e4. Take Advantage of the latest api's
make a i18n plugin and use
#Inject
#Translation
Messages messages;
use ISideEffect as Binding
for me it becomes fun to code with e4
After almost 2 years there has been no decent response to this question. So i'm considering the Eclipse E4 platform efectively dead, as there are still people voting for this question and can't find an answer.
The only answer I have is - move to the NetBeans Platform. There are similar problems there, but at least people do answer in the mailing list and there are books which are quite more recent and are actually providing working source code! Enve the NetBeans website provides free tutorial on a lot of stuff for free!
I mean it's really hard to believe, but you should try NetBeans platform - it's the only choice.
For anyone who stumbles here looking for an e4 example, here's a simple basic example on using eclipse 4 rcpeclipse 4: rcp getting started
Standard Eclipse documentation for version 4.3 (Kepler) contains javadoc for the most part of e4 project:
http://help.eclipse.org/kepler/topic/org.eclipse.platform.doc.isv/reference/api/overview-summary.html?cp=2_1_0

Creating a plugin for code hinting

I'm working with an internally-developed scripting language that some prof and his team have created for an academic project. There's documentation that show function signatures of the existing classes, but for outsiders like me, I'm constantly referring to documentation. Also, in the summer, more helpers will join and I bet they will all suffer from the same problem. So I'd like to write something in Eclipse to help with code hinting and completion, like many languages have.
I haven't programmed eclipse add-ons before, so can someone give me hints how I would generally take the function signatures from their documentation and get code hinting from it. I realize I may need to make changes to the documentation to use it for what I need. But any hints or sample projects would be appreciated. I'm not sure how to get started.
You should have a look at Xtext. With Xtext you can define a domain specific language and generate an editor for it. Here you can find a brief tutorial.

How is eclipse ide seen in the academic world?

I'm just curious if anybody has an idea of how wide-spread the use of eclipse is in universities/faculties around the world.
The reason for which i'm asking this question is that i'm under the impression that netbeans is BY FAR more used in the academic world than eclipse, yet i hear so many great things about eclipse. I would have thought that eclipse should have the upper hand in universities since it also supports swt in addition to swing. And at first-glance OO programming seems to have a greater support in eclipse than in netbeans.
Also it defines concepts like extension points for which i can't find equivalents in netbeans.Overall it seems more oriented towards developing "loosely-coupled" components. Then again my experience with eclipse is close to null so it may be that i am mistaking and it really isn't that good.
I am a PhD student in Budapest University of Technology and Economics. During the years of my BSc and MSC education I took several courses where we could use different IDES, such as Eclipse, Netbeans, Visual Studio or even Emacs, and there was no single IDE put forward as the future.
However, the Eclipse platform as a good plug-in based modeling and programming environment is quite interesting in academic research: the well-known Mylyn project was started during PhD, half of the Eclipse Modeling projects are more or less research projects, and I am really sure that there are many more research projects based on Eclipse. And this might mean, that there is interest in knowing Eclipse more deeply.
About the popularity and SWT support - I don't think that matters, but what the lecturers have actual experience in. And I think, that is the most important thing.
From my experience graduating with a PhD in CS from the University of British Columbia, I can say that Eclipse is the only IDE that is really used in undergrad classes. Some of the more systemsy classes will use Emacs, but most will use Eclipse. In the 4th year Software engineering course, all students are expected to create their own Eclipse plugin.
Perhaps, the bias towards Eclipse comes from the fact that the grad school does get significant funding from IBM and the Eclipse Foundation. Many grad students implement their thesis ideas as plugins for Eclipse (I was no exception). But, more than just money, Eclipse is a very lively open-source community, it is extremely modular, and the funding the grad students get tends to be with little strings attached.
On top of that, when going to Software engineering-oriented conferences (such as OOPSLA or ICSE), you'll find that the vast majority of papers that provide IDE integration will do so with Eclipse (Visual Studio is a distant second, and I can't think of a single NetBeans-based research paper off the top of my head).
All of these things seem to show that Eclipse is a popular playground for academic research. And this shows why it is also popular with undergrads. Undergrads like using Eclipse because it is seen as an essential job skill, whereas NetBeans is not considered this way from what I can see.
(Disclaimer- after using Eclipse to complete my PhD, I am now project lead on an Eclipse project, and contribute to several others.)
I can only offer my own experience:
I'm taking the Computer Science MSc at Imperial College, London. The only "IDE" we were taught was Emacs. There's a strong emphasis on learning the language essentials and then it's left up to the student to choose which IDE to go for. (We were briefly introduced to Eclipse in the 2-day "Intro to Java Course" and I think it was used in the concurrency course too, although I didn't take concurrency.)
That said, I've been using Eclipse for most of my projects and many of my course mates and many of my tutors use Eclipse but a fair few use Netbeans as well. I wouldn't want to guess which is the most used. Both Eclipse and Netbeans are both installed on the university CS department machines.
I am taking a Computer Science BSc at University of Manchester, UK. Like Jack Kelly, we weren't shown to use IDE's as we were encouraged to use vi and others editors.
We did have a single lab exercise using Eclipse and another using Netbeans.
Netbeans was useful if you were creating GUI's but overall I prefer Eclipse.
Now that IntelliJ has an open version, perhaps we will see it being used more in Academia..
NetBeans has been eclipsed by Eclipse.
Knowing Eclipse well is a marketable skill.
Well my professor swears by Eclipse - Eclipse has many books written about it. It has a huge amount of 3rd-party add-on functionality.
Sure, NetBeans is a respectable and excellent IDE. But Eclipse just has more eyes scanning it and thus is updated and fixed more often too.
I can comment that it's used in CS 61B at Berkeley (the lower division Data Structures course, taught in Java). I don't really know much else, unfortunately.
Java lecturers in TAMK Polytechnic in Finland teach with Eclipse. Thatt said, I prefer Netbeans by far, and I've found it installed in most machines there.

GUI Platform choice: Google GWT, SmartGWT, ExtGWT and SmartClient

We are in the process choosing a new GUI platform. Ive been looking at subj. but are a bit confused. Could someone please refer to at tutorial or blog that makes a qualified comparison.
Thanks.
Nikolaj G.
We've used SmartGWT for a couple of projects and it's ok but there are tradeoffs:
PRO:
Makes it easy to write a web app that looks and works like a rich client GUI.
Don't have to know any Javascript. SmartGWT coding is pretty similar to Swing coding, which is good if you already know how to do that.
CON:
Unless you do a lot of work tinkering with the look and feel, your app won't look very web-like, it will look like a rich client app running in a browser. You may not care about this.
It's a pretty heavyweight library which has to download large .js files to get going.
We found it difficult to control the layout of form controls precisely, but that might just be our inexperience.
I think you should fully understand what GWT does and what your projects needs are first and foremost. There wont be a source that will adequately compare them for your specific needs.
Start with the wikipedia http://en.wikipedia.org/wiki/Google_Web_Toolkit
Here is a comparison of SmartGWT vs GWT
http://www.theserverside.com/discussions/thread.tss?thread_id=60186
If interested in AJAX RIA Frameworts, below analysis is for you
Before starting new GUI for our new project arrival, I made some research.
Here are my findings (remove spaces from "http: // "; bcoz stackoverflow is preventing me to do so :)):
Prototype framework favorable links:
http://en.wikipedia.org/wiki/List_of_Ajax_frameworks
http://www.javabeat.net/articles/12-comparison-of-ajax-frameworks-prototype-gwt-dwr-and-1.html
http://www.devx.com/AJAXRoundup/Article/33209
Dojo framework favorable links:
http://blog.creonfx.com/javascript/dojo-vs-jquery-vs-mootools-vs-prototype-performance-comparison
jQuery framework favorable links:
http://blog.creonfx.com/javascript/mootools-vs-jquery-vs-prototype-vs-yui-vs-dojo-comparison-revised
Test speed of different RIA frameworks:
http://mootools.net/slickspeed/#
More comparasions:
http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
http://jqueryvsmootools.com/#conclusion
Out of all these findings I started using SmartClient 5. Initially we faced some issues but as SmartClient matures I find it interesting in many terms:
1. APIs doc help and examples
2. Flexible controls
3. Forum
Today I am working on SmartClient 8 and few on my GUIs are in production running successfully. Actually the great help with SmartClient is that you find every thing at one place. No need to dug many other sites that is hard to do for any other open source RIA framework.
So my choice is no doubt SmartClient.
Thanks
Shailendra (shaILU)

What to select next, for building Desktop-application?

I have been reading Groovy, and I'm half way down. I started to love groovy a lot, and apply it to solve some simple real world problem; As I love building web applications, i would go for reading Grails webframework as I know Groovy.
But If I want to build desktop-applications, which framework will be the good choice? I wanted to create a simple IDE for Groovy language(or say for any language), that can do syntax highlighting and other kind of stuffs.As mentioned earlier, I love Groovy a lot when compared to Java; And Griffon is a framework that is built on Groovy, mainly for creating Desktop-appplications. But I didn't find enough resources for Griffon!
Is Griffon is the good framework for those people who know and love Groovy(as I do)? Can I choose it for building a simple IDE as mentioned above? Or there are any other framework that is built on Groovy, which is good when compare to Griffon?
The problem I have found with Griffon is that a number of the plugins are a bit out of date in that they aren't using the latest UI libraries (e.g. Flamingo, Substance, and SwingXBuilder, altho I think this has just been upgraded to use SwingX 1.6).
I am using SwingBuilder directly, with a few extensions I have added via my own builder implementation:
http://code.google.com/p/ousia
If you want to build an IDE I can recommend the RSyntaxTextArea component, as it has great support for many programming languages and is pretty simple to use:
http://fifesoft.com/rsyntaxtextarea/
Griffon is a fairly good MVC based framework, and is built on top of Java Swing. So it can do anything that Swing can do.
To be honest I found Griffon a little too much for relatively simple UIs, so I usually write my apps in Groovy using SwingBuilder directly.
If you really want to get into Griffon I recommend getting the Book
Griffon in Action It seems to be the only place where everything is documented, although the web page is coming along and improving all the time.
There are definitely various resources out there that will let you learn more about Griffon, for example the Griffon Guide -> http://dist.codehaus.org/griffon/guide/index.html
"Griffon in Action" is another popular resource which you can buy in electronic form today; being the author of both makes me a little biased ;-)
You can keep up to date on Griffon news by following the mailing lists and #theaviary on Twitter