Launching patterns from Java program

60 views
Skip to first unread message

Olivier Finot

unread,
Aug 17, 2012, 10:18:55 AM8/17/12
to incquer...@googlegroups.com
Hello,

I am currently using IncQuery and it is working perfectly.

Due to the number of files I have to run my queries on, I wanted to write a Java program to automate the process.
I tried to use the generated matcher (as shown at the bottom of this page : http://viatra.inf.mit.bme.hu/incquery/new/examples/school).
However when I try to run the program, I have the following error message :
Generated EMF-IncQuery patterns cannot be used in standalone Java applications, for now we need the Eclipse Platform running

 The program I wrote is not a standalone application, and I am running it from eclipse, so I do'nt understand the source of the problem.

Thanks in advance for any input you could have on my problem.

Olivier

Ábel Hegedüs

unread,
Aug 17, 2012, 11:06:35 AM8/17/12
to EMF-IncQuery Users on behalf of Olivier Finot
Dear Olivier,

first of all thank you for using EMF-IncQuery. Can you give a bit more details on how you are trying to run your applocation?

The error message you encountered is shown if EMF-IncQuery matchers are initiated in an environment where extension points are not available. For example, if you create a java file with Eclipse, but run it as a simple Java Application (static void main) or a JUnit Test, then it will run in a separate JVM and without OSGi bundles. If this would be the case, I suggest changing to running a JUnit Plug-in Test as that provides the easiest entry point to run a selected method.

Best regards,
   Ábel
____
http://about.me/abelhegedus/bio


--
You received this message because you are subscribed to the Google Groups "EMF-IncQuery Users" group.
To post to this group, send email to incquer...@googlegroups.com.
To unsubscribe from this group, send email to incquery-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/incquery-users/-/NLb8v6LjEqsJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Olivier Finot

unread,
Aug 17, 2012, 11:39:00 AM8/17/12
to incquer...@googlegroups.com
First of all thanks for your quick answer.

You've guessed right, I was trying to run the program as a Java application.
I understand now the source of this error.
I will try to proceed as you suggest and see if it works.

Olivier

István Ráth

unread,
Aug 18, 2012, 3:55:08 PM8/18/12
to EMF-IncQuery Users on behalf of Olivier Finot
Dear Olivier,

the RCP application example may be of help to you: http://viatra.inf.mit.bme.hu/incquery/new/examples/application

regards
Istvan

Olivier

--
You received this message because you are subscribed to the Google Groups "EMF-IncQuery Users" group.
To post to this group, send email to incquer...@googlegroups.com.
To unsubscribe from this group, send email to incquery-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/incquery-users/-/Sf_95x2e4ukJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
István


Olivier Finot

unread,
Aug 21, 2012, 8:23:51 AM8/21/12
to incquer...@googlegroups.com
Hello again,

I looked at this rcp example, but I can't get it to work.

I have probably forgotten something or did it inappropriately, since I am not familiar with creating a rcp from Eclipse.

I just exported the project containing the application as an Eclipse application, and tried to run it using the given command
eclipse.exe -m c:/test/input.ecore - p EClassNames

I have no error, but nothing appears on the console.

It is probably due to some basic thing I did not do, but I have no idea of what it is.

Olivier

István Ráth

unread,
Aug 22, 2012, 3:38:46 AM8/22/12
to EMF-IncQuery Users on behalf of Olivier Finot
Hi Olivier,

I would like to help you, but for this I'm asking you to open a new issue for your problem on https://github.com/ujhelyiz/EMF-IncQuery/issues/new
If possible, attach the code written by you to the ticket (e.g. by uploading it to dropbox or google drive and including the link in the ticket). 

thanks
Istvan

--
You received this message because you are subscribed to the Google Groups "EMF-IncQuery Users" group.
To post to this group, send email to incquer...@googlegroups.com.
To unsubscribe from this group, send email to incquery-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/incquery-users/-/k8AlFu7WHXYJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
István


Reply all
Reply to author
Forward
0 new messages