In my current project, I write high-level specification ( as indicated below for reference) and am parsing it using grammar written in ANTLR and then using StringTempate to generate equivalent Java programming code. Now, my client finds the writing of this textual high-level specification difficult and want me to provide equivalent visual drag and drop programming constructs and editor to specify this programming constructs. My question is : does eclipse provide any
drag and drop workbench to develop visual programming constructs and editors?
It MAY be easy to integrate with ANTLR.
A Sample example or its link will be useful.
TemperatureSensor
generate tempMeasurement : TempStruct;
TempStruct
tempValue : double;
unitOfMeasurement: String;
You could have a look at Graphiti, it is much lighter than GMF and easier to setup.
https://eclipse.org/graphiti/
In any case to leverage existing tools in eclipse to manipulate models, you absolutely need a metamodel to integrate into the EMF, so you might use Xtext to develop that, based on your existing antlr grammar.
Have a look at Eclipse Graphical Editing Framework (GEF), it's a framework for creating graphical editors in an Eclipse-based product or plug-in. There are even some efforts to integration GEF with XText, for example this one.
Yes, Eclipse has the Sirius project. https://www.eclipse.org/sirius/
Related
I want to write a text editor in JavaFX which acts similar to Eclipse/Netbeans IDE to highlight the Java code.
Can anyone suggest as to how it can be achieved or anyone has done this previously.
Thanks.
There's no pure JavaFX libraries for the code highlighting / editing as far as I know, so if you want to implement it in JavaFX you're going to be translating from a similar Swing (or other) project, or you're on your own.
However, you can use such a Javascript library and wrap it in a WebView if you want to achieve this - Jewelsea (who often swings by here) has done just this and explained it rather nicely here.
RichTextFX let's you specify style classes for ranges of text. Take a look at the Java keywords demo and its source code.
For any current searchers with this question, MonacoFX is a very nice, convenient, and EASY to use library that offers feature-rich code editing with at least 50 or 75 languages that it can properly syntax highlight, code fold, and all that good stuff. It is the same code editor that is used in the open-source version of Visual Studio. When I built my app and integrated MonacoFX, it was literally the most effortless portion of my project.
You can use eclipse text framework as posted
They also have a javafx code editor component called compensator
you can use intellij's swing code editor, with javafx swing interoperability
the component is com.intellij.openapi.editor.impl.EditorComponentImpl
you can check details running with intellij integrated ui inspector
Premise:
I started writing an IDE web application a year or so ago. It would be similar to Adobe's Dreamweaver. It would have a WYSIWYG, text editor, and debugging tools. Of course, there are other new features that I'd like to write- otherwise, I wouldn't be writing my own IDE. I wrote a syntax highlighter and parser in JavaScript and started writing the WYSIWYG using the HTML DOM. However, as fast as rendering and JavaScript engines have gotten, they aren't the best choice for writing an IDE. So, yes, I realize how difficult an IDE is to program.
Question: Currently, I plan to write the IDE in Java or C++ (preferably Java). Instead of writing my own interpreter for PHP/HTML/CSS/JavaScript/etc., I'd like to integrate my application with as many existing tools as I can. I know Java has Rhino and Quercus. Gecko and pretty much any JavaScript engine can be integrated with C++. My question is:
What are the best engines available for C++ and Java? For PHP, HTML, CSS, and JavaScript specifically.
Would it be possible to tap into these engines to write a debugger and other tools? Preferably, as unobtrusively as possible, so I can update engine versions without much hassle.
I'm not sure what the best way to approach this. I'd prefer not to have to go back and rewrite the whole thing because my design is flawed. Any suggestions would be deeply appreciated.
I would start with an open source IDE and extend it. Netbeans and Eclipse already support a good number of languages and have debuggers.
IntelliJ CE supports all the languages mentioned, so perhaps you only need to extend it to do what you want. You might not need to write any code at all. ;)
I'm newbie for Eclipse. I don't know what plugin can create class diagram, sequence diagram... and generate java code and of coursce, it's free. Anyone know some tools like this ?
eUML2 Free Edition gathers all basic features needed by java developpers and is free of use (even for commercial purposes)
I would recommend to use Togethersoft or Omondo for java but these tools are not free.
The only java free UML tool is eUML but it adds plenty of tags in my code. The generated code is a mess because the UML model is using # UML directly in my java code. Both UML model and java code are therefore mixed mixed.
If I refactor my code then all my model is lost. I only change one of my attribute and all my model was immediately lost. What was the worst is that I also lost my code which was changed. I needed to paste a copy manually all my classes and create a new project. I lost many hours of work just because I did create 2 small class diagrams !!
My code format has been changed without my permission. This is an unacceptable behavior. I like the tool but don't want that UML code generation be so intrusive in my java code. The graphical design is pretty nice but because this is live code and model syncrhonization and that the code is dirty this is a no go for me. It would have been good to separate live code generation from model and UML design like the other tools.
For Eclipse, I suggest using eUML2 (http://www.soyatec.com/euml2/installation/).
If using Eclipse is not a must, I think the better choice would be https://www.magicdraw.com/ - they have a free version for students.
Topcased contains a UML editor together with a Java generator (and reverse).
The Papyrus Editor is included in Topcased.
They are both based on Eclipse Modeling Project.
Have a look on tutorials.
I'm building a Java IDE and am trying to implement autocompletion or intellisense. After looking around for something that will do most of the work for me (not reinventing the wheel etc) I've pulled the code for Eclipse JDT core and am trying to figure out how to implement it in my own IDE. I'm obviously working under the assumption that this is possible.
If anyone knows a lot about Eclipse JDT Core, implementing intellisense, or other fun things that would help me accomplish my goal and would like to weigh in, I would appreciate it! Thanks!
Another module that could help when implementing intellisense would be XText
(might be a bit too generic for your specific JDT domain)
Xtext is a framework for development of programming languages and domain specific languages (DSLs). Just describe your very own DSL using Xtext's simple EBNF grammar language and the generator will create a parser, an AST-meta model (implemented in EMF) as well as a full-featured Eclipse text editor from that.
alt text http://www.eclipse.org/Xtext/documentation/0_7_2/images/getting-started-editor.png
Is there any Grammar editor utility for context-free grammars developed in Java?
The one I know about would be XText.
Might be a bit over-kill:
Xtext is a framework for development of programming languages and domain specific languages (DSLs). Just describe your very own DSL using Xtext's simple EBNF grammar language and the generator will create a parser, an AST-meta model (implemented in EMF) as well as a full-featured Eclipse text editor from that.
The DSL editor looks like:
alt text http://www.eclipse.org/Xtext/documentation/latest/images/getting-started-grammar.png
Allowing you to play with the language you just defined:
alt text http://www.eclipse.org/Xtext/documentation/latest/images/getting-started-editor.png
ANTLRWorks the GUI development environment for ANTLR is quite nice. I've used it with ease in the past.
http://www.antlr.org/works/index.html
I also found that:
http://ozark.hendrix.edu/~burch/proj/grammar/
If you prefer compiler built into your app without generating any source files, take a look at Parboiled: https://github.com/sirthias/parboiled