Embedding DSL in Java

Hello everybody,
I have developed a DSL. Now I want to embed this DSL in java.
I am new in this concept (Embedding DSL in GPL or java).
Is it possible?
Can I write the code between java codes with my DSL keywords?
Best regards
Parisa

On 30/06/2015 08:36, Christian Dietrich wrote:
> you may have a look at https://github.com/LorenzoBettini/javamm as well
Thanks for mentioning that, Christian :)
In the near future, I'm planning to refactoring the plain expression
part to be reusable in other DSLs.
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book

Similar Messages

  • PDF Forms embedded in Webdynpro Java - Can eCATT recognize???

    Hi All,
               Will eCATT be able to identify the PDF forms embedded in Webdynpro Java applications.....
    Thanks in Advance
    Puru

    I think it will not. I am almost sure it will not. Any new complex screens are a challenge to eCATT. Flash, Flex and sometimes even trees.
    Says,
    Justin

  • Embedding video in Java Application

    I'm a total newbie, trying to decide if Java is the way to go for our application.
    We want to be able to create an interactive application with buttons, drag & drop, data input fields, hot spots, etc
    AND also show video... windows format, apple format, flash format.
    We want our application to be deployable either as...
    1 - a standalone app... running on a system not on a network or the internet
    2 - a web app
    We want the video player to be embedded in the application and not launch a player in a seperate window... thus we want to maintain as much control within the confines of our application as possible.
    MY QUESTIONS:
    1 - Will the Java Media Framework allow us to embed movies in our application as described?
    2 - Is it fairly easy to code such in our Java application?
    3 - Any code snippets around?
    4 - Re: Standalone/CD distribution version: Can the JMF be installed along with the application so the client doesn't have to "go out and install more stuff" ??
    5 - Re: Web - must the user download and install more stuff... other than the Java Virtual Machine to have the JMF work on their system?
    6 - Is the JMF multi-platform... Windows, Apple, Unix/Linux, etc like the JVM ?
    thanks for any help on this. Will

    Yes all of what you require is doable in Java
    Try
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html
    Check some of these samples
    Also for a web version check
    http://java.sun.com/dev/evangcentral/totallytech/jmf2.html
    (Haven't studied this myself - but should give you an idea or two)
    Platform-wise - check here
    http://java.sun.com/products/java-media/jmf/2.1.1/download.html
    In terms of CD distribution - you should be able to package most stuff into a Jar file
    Not completely sure as there are 'Windows Performance pack' downloads which I think toake advantage of native DLLs
    Have a read around the JMF Installation pages - should answer most of your questions

  • Embedding html in .java file comments

    for years now the convention has been to liberally use html in java source code comments
    to beautify javadocs. for example, i have taken this out of the source code for java.lang.System:
    * The <code>System</code> class contains several useful class fields
    * and methods. It cannot be instantiated.
    * <p>
    * Among the facilities provided by the <code>System</code> class
    * are standard input, standard output, and error output streams;
    * access to externally defined "properties"; a means of
    * loading files and libraries; and a utility method for quickly
    * copying a portion of an array.
    * @author Arthur van Hoff
    * @version 1.125, 12/03/01
    * @since JDK1.0
    the problem i see with this is that the tags must be stripped if one is producing
    documentation in formats other than html (swing doclet, or pdf doclet, or any
    application of xml).
    aren't we forever tying ourselves to html? is there any intention on the part of
    j2se/j2ee developers to discontinue this practice? i've begun working on a xul
    doclet and am having to enclose the documentation in cdata to maintain the
    validity of the document i produce (i could also just strip out the tags of course).
    thanks, eitan

    Hi Eitan,
    I see little problem as long we provide a way to
    parse whatever format is being used.
    Please take a look at the commentdom package in
    the "Doclet Refactoring Design" under "What's New"
    on the right side of the Javadoc home page:
    http://java.sun.com/j2se/javadoc/
    Here's its description:
    com.sun.tools.doclet.toolkit.util.commentdom
    DocComment to DOM Translator - Documentation comment contains embedded HTML,
    Javadoc inline tags as well as custom inline tags. This package will contain classes that will help
    generate a DOM tree for the documentation comment. This can be of great help for doclets that
    generate documentation in formats other than HTML. Such doclets don?t have to undergo the
    tedious task of parsing the documentation comments for all the tags. Doclets can then directly
    traverse the DOM tree and then convert the tags to appropriate format.
    The DOM tree will adhere to the doccomment DTD that will be published later. The DTD will
    allow required HTML tags along with their attributes as defined in HTML4.0 specifications. The
    DTD will also support Javadoc-defined inline tags as well as user-defined custom inline tags.
    We plan for the doclet toolkit other than this part to be in Tiger;
    we haven't committed dates to delivering this piece, but feel it
    would be an important part of the toolkit.
    -Doug Kramer
    Javadoc team

  • Embedding perl in Java

    Are there any good websites/tutorials about how to go about embedding/using perl code in Java?
    How is it done?
    thanks, B.

    Are there any good websites/tutorials about how to go
    about embedding/using perl code in Java?
    How is it done?
    thanks, B. Try these links:
    http://www.perl.com/cs/user/query/q/6?id_topic=29
    http://www.perldoc.com/perl5.6/pod/perlfaq3.html#How-can-I-compile-Perl-into-Java-

  • Creating an HTML page with an embedded image in JAVA

    is it possible to have a code in java that creates an HTML page,
    reads an image file and embeds this to the HTML page?
    can anyone give me a sample code? =)
    thank you very much!

    Just tried this out, and it doesn't do what I was hoping: embed the image into the HTML document as a byte stream, so that the HTML document will display the image, without a seperate file.
    When I did:
    import java.io.*;
    public class EmbeddedImageTest {
        public static void writeHTML(String htmlfile) {
            File htmf = new File(htmlfile);
            FileOutputStream fout;
            DataOutput dout;
            try {
                fout = new FileOutputStream(htmf);
                dout = new DataOutputStream(fout);
                dout.writeBytes("<html><head></head><body><img src=" +
                    "file:/C:/image.jpg></body></html>");
            catch(IOException ie) {
                ie.printStackTrace();
        public static void main(String[] args) {
            writeHTML("c:/embeddedImage.html");
    }I just got an HTML file containing "<html><head></head><body><img src=file:/C:/image.jpg></body></html>".
    I've seen images get embedded in MS Outlook HTML e-mails. Does anyone know if this is done in a standard way (ie not through some MS-proprietary way), and if it can be done with an HTML file made by Java?

  • Embedded Printer Webpage & Java Issues

    I work with many LaserJets daily and I also do a great deal of troubleshooting for them. I`ve been able to figure out or I just simply knew how to fix many of the problems our printers present. They are all very old devices. They are the following, along with the number of each that I`m responsible for:
    -HP LaserJet 4100 (12)
    -HP LaserJet 4050 (3)
    -HP LaserJet 3052 (23)
    -HP LaserJet M1522n (1)
    -HP LaserJet 1200 (1)
    -HP LaserJet 1300 (1)
    -HP Color LaserJet 4600 (4)
    -HP Color LaserJet 3700 (1)
    -HP Color LaserJet CP2025dn (1)
    -HP Color LaserJet 2605dn (1)
    It`s not a huge number of printers but there is high demand for printing and when I get calls for printers offline, it is almost always the same issue...the device has been assigned a new IP.
    Now I`m aware that setting the cinfiguration to Manual, or static, thge IP will stick to its printer and not change. I have set most of them to have a static IP but others use an old, external Jet Direct print server. You know, the kind that have the big paralell port. I can`t seem to access those device`s embedded webpages no matter what I do and I`ve done jkust about everything. I keep getting a message that says the Java plug-in needs to be updated. I updated it and nothing. Still blocks me from accessing the webpage. I need to access the webpage to more easily make changes without having to run around campus troubleshooting.
    Any idea on what could be causing the print server embedded webpage to not display? I get security warnings too, but tried alteringf those and still no luck. 
    Any help would be appreciated.

    Hello RaelS.
    To reset the EWS user name and password, you can try reset network settings to default.
    Setup - Network - Restore Network Defaults.
    Cheers!
    Wixma.
    I am an HP employee.
    Say thanks by clicking the Kudos star in the post.
    If my reply resolved your problem, please mark it as as Accepted Solution so that it can be found easier by other people.

  • How to use Embedded browser in Java using Linux Platform?(Very urgent.....)

    Hi,
    I'm trying to use the embedded browser in Linux, but it fails with the following error:
    Can't execute the native embedded browser. Error message:
    when I use it on a Windows machine, it works fine.
    i get this
    org.jdesktop.jdic.init.JdicInitException: java.lang.UnsatisfiedLinkError: no jdic in java.library.path
    at org.jdesktop.jdic.init.JdicManager.initBrowserNative(Unknown Source)
    at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unknown Source)
    at netsim.NetSimBasics.<init>(NetSimBasics.java:40)
    at netsim.NetSimBasics.main(NetSimBasics.java:64)
    Caused by: java.lang.UnsatisfiedLinkError: no jdic in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at org.jdesktop.jdic.init.InitUtility.<clinit>(Unknown Source)
    ... 4 more
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jdic in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at org.jdesktop.jdic.browser.internal.WebBrowserUtil.<clinit>(Unknown Source)
    at org.jdesktop.jdic.browser.MsgClient.<init>(Unknown Source)
    at org.jdesktop.jdic.browser.NativeEventThread.<init>(Unknown Source)
    at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unknown Source)
    at netsim.NetSimBasics.<init>(NetSimBasics.java:40)
    at netsim.NetSimBasics.main(NetSimBasics.java:64)

    use JComboBox
    JComboBox liste = new JComboBox(new Object[]{"azerty","qwerty});the api documentation :
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComboBox.html
    the turotial on combobox :
    http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html

  • Embedded OC4J Error : java.lang.OutOfMemoryError: PermGen space

    Hi all,
    When testing apps using embbed OC4J I experience the java.lang.OutOfMemoryError: PermGen space.
    If occur on OAS, I add :add -X:MaxPermSize=256m to the startup java options on opmn.xml, and problem solved.
    How can I set the startup jaav option for embedded OC4J ?
    Thank you,
    xtanto

    hi xtanto
    To set system properties for the embedded OC4J you could try "Project Properties" > "Run/Debug" > "Edit..." some "Run Configuration" and add your property to "Java Options" on the "Launch Settings" panel.
    success
    Jan Vervecken

  • PDF to html conversion with embedded images in java

    hi all,
    i want to convert any pdf file to its html equivalent. currently i am using PDFBOX java api to do that. it works fine with simple pdf files having no images, but if there are embedded images in pdf file then it do not show these images.
    anyone who has clue of solving this problem. i can convert individual pdf pages to jpg pictures if all embedded images would also be in these pictures.
    help me regarding pointers to other APIs, code snippets etc that can solve my purpose.
    thanks in advance

    Hi..
    really soorry i am not having any solution for u.
    But i am having one problem regarding pdf box, i think u know pdf box, i am reading japanese file using pdf box, its giveing
    caught a class java.io.IOException
    with message: Unknown encoding for 'UniJIS-UCS2-H'
    I have wrriten code like this.....
    PDDocument pdfDocument = null;
    PDFParser parser = new PDFParser( new FileInputStream(file));
    parser.parse();
    pdfDocument = parser.getPDDocument();
    PDFTextStripper stripper = new PDFTextStripper();
    String text = stripper.getText(pdfDocument);
    reader = new StringReader(text);

  • Embedded systems and java

    Hello friends..
    i want to know about javas implementation of projects with embedded systems.....i have a project related automation of HOSPITALS where i have to implement it with computer kiosks and other Machines related to sensors,readers etc;
    could you pls help me in finding more information and related packages classes..
    thanking you
    kesari;

    There's the Micro Edition of Java.

  • Java Embedded ME 8 - Java DB support

    Can I use Java DB in a Java Embedded ME 8 application?
    Thanks.

    Hi,
    Sorry for the slow reply. Java DB requires a JDBC driver, which in turn requires certain functionality and APIs that Java ME 8 doesn't provide.
    There are some lightweight 3rd party databases (relational and object-oriented) that run on CLDC 1.x (see some links here and here) and these  *should* work on Java ME 8 (but I haven't verified that).
    I expect that with the upcoming Java ME 8 release 3rd party developers will start supporting Java ME 8 with database functionality.
    Best,
    -- Terrence

  • Embedding Flash in Java

    I'm relatively new to Java programming, and I'm in need of some help.
    Could someone please let me know if it's possible to embed a Flash animation in a Java application. If so, how?

    I believe there was some way using JMF. Search the forums.

  • Embeding flash in java

    can i load and play a flash .swf file in java???

    in servlets.... doesn't that mean it's server side...
    i don't really understand.~!!

  • Embedding 3 consecutive Java Drop Down Menus

    I cant seem to embed 3 java menu forms consecutively...in one table.
    The HEAD CODE IS:
    <SCRIPT TYPE="text/javascript">
    <!--
    function dropdown(mySel)
    var myWin, myVal;
    myVal = mySel.options[mySel.selectedIndex].value;
    if(myVal)
       if(mySel.form.target)myWin = parent[mySel.form.target];
       else myWin = window;
       if (! myWin) return true;
       myWin.location = myVal;
    return false;
    //-->
    </SCRIPT>The first menu which works fine code is
    <FORM
         ACTION="../cgi-bin/redirect.pl"
         METHOD=POST onSubmit="return dropdown(this.gourl)">
    <SELECT NAME="gourl">
    <OPTION VALUE="">Vechile
    <OPTION VALUE="" >------------
    <OPTION VALUE="http://www.phatkars.com/front_whl_drive.htm" >Acura
    <OPTION VALUE="" >Acura MDX
    <OPTION VALUE="" >Audi
    <OPTION VALUE="" >BMW 3 series
    <OPTION VALUE="" >BMW 5 series
    <OPTION VALUE="http://www.phatkars.com/bmw_740i.htm" >BMW 7 series etc...
    The second and third menus are the same:
    <FORM
         ACTION="../cgi-bin/redirect.pl"
         METHOD=POST onSubmit="return dropdown(this.gourl)">
    <SELECT NAME="gourl">
    <OPTION VALUE="">Brand
    <OPTION VALUE="" >------------
    <OPTION VALUE="http://custom-wheels-car-rims.phatkars.com/index.php?manufacturers_id=6" >Akita Rims
    <OPTION VALUE="http://custom-wheels-car-rims.phatkars.com/index.php?manufacturers_id=5" >Alloy Technologies
    <OPTION VALUE="http://custom-wheels-car-rims.phatkars.com/index.php?manufacturers_id=19" >Baccarat
    <OPTION VALUE="http://custom-wheels-car-rims.phatkars.com/index.php?manufacturers_id=25" >Big Thang
    <OPTION VALUE="http://custom-wheels-car-rims.phatkars.com/index.php?manufacturers_id=25" >Brazen     etc...
    In an HTML document I just have one <FORM> code </FORM> after another but only the first menu works...Can you Help??
    THE FIRST MENY ALLOWS THE USER TO SELECT AN OPTION AND CONNECT TO THE LINKED SITE SUCESFFULLY..THE OTHERS REDIRECT THE USER TO THE REDIRET.PL..CAN ANYONE HELP? i can e-mail you the html for the index :(

    Well, you're not alone.  Here's another thread where they have the same problem, but there's nothing in there about a fix. https://discussions.apple.com/message/16372377#16372377
    I'm also on Aperture 3.2 and Mac OSX 10.7.2 and I'm not seeing this.

Maybe you are looking for

  • Safari 5.05 crashes on start-up

    Hi! I just upgraded to OS10.6.8 and Safari 5.05 and now everytime I open Safari, it crashes after 5-10 seconds. I read some of the threads and tried deleting add-ons in the Library folders, but this didn't work. Also repaired/verified permission and

  • General queries related to implementing the web service

    Hi all, I am new to web services, so I would like to get some of the queries solved which I am facing as of now. - If in a function of web service, there are three parameters defined, in which one is input parameter while remaining others are output

  • Bean differences between tomcat and oracle

    All I have created a session bean in a servlet and am trying to use it in a jsp page. On my localhost I am using Apache Tomcat 4.0 and everything works fine. In my test environment I am using oracle9i's app server and I am getting a "java.lang.ClassC

  • Deadlock occurs with set_maxsize() on in-memory db's using shmem: (patch)

    Calling set_maxsize() for a database's memory pool on in-memory db's using shared memory after the db_open will cause a mutex deadlock. A look into the code revealed this mutex lock/unlock mismatch. --- db-4.6.21.orig/mp/mp_fmethod.c     2007-06-01 1

  • Nokia 2310

    My son is going to france in the morning does anyone know if the Nokia 2310 will work with an 02 sim from i phone thanks