Creating a new discoverer [message #789809] |
Fri, 03 February 2012 07:35  |
Eclipse User |
|
|
|
What I am trying to do is create a new Discoverer to attach a parser I have built previously onto it. I then want to get it to output some sort of standard model format I can look at like KDM or something (I am not that worried about what it outputs any of those standard modelling systems would do as this is just an initial test to give me an idea of how Modisco works).
I've found the API and a basic guide to creating a new Discoverer but I find myself confused. I have created this thread to add problems to as I encounter them in hopes that some of the experts using Modisco could maybe shed some light on them and speed me along.
Please forgive me if my questions are stupid questions. I am very new to Modisco and OSGI so I'm finding this all quite confusing.
OK so to my initial questions:
1) Why do I need Parameters in my Discoverer? What is their purpose?
I have read the API documentation on them and I am still confused. At first I thought things like this:
private String myParamIn;
@Parameter(name="PARAM_IN")
public void setMyParamIn(final String value) {
this.myParamIn = value;
}
were just there to help set the source file up to be discovered but that doesn't make sense because the basicDiscoverElement(IFile source, IProgressMonitor monitor) method has a "source" parameter right there.
2) Is there a separate class dealing with output formatting so that as I identify the various statements (e.g. 'if' statements) in my source I can add those elements to the model or do I have to build a class for this myself?
|
|
|
|
|
|
|
|
|
|
Re: Creating a new discoverer [message #1266575 is a reply to message #789809] |
Fri, 07 March 2014 12:09   |
Eclipse User |
|
|
|
After looking for my problem in the MoDisco forums for this, I have decided to post my reply here and reopen this topic.
My problem relies in my impossibility of execute any discoverer of my own creation. The others' discoverers work fine.
I have followed the instructions of the Official Eclipse Documentation and I have copy its same basic discoverer example but with no success.
No matter if I create the discoverer in a MoDisco Project or if I declare it in a general project and change its nature after to a MoDisco Project.
More concretely, I cannot find my discoverer in the "MoDisco Discovery Configuration Menu" when I click in "Run Configurations..." firstly (I show you in the file empty-menu.jpg). And when I select the menu, it only gives me the discoverers showed in the below image: menu-without-own-discoverers.jpg (my unwanted menu).
But my discoverers don't appear.

I followed the instructions of the Documentation and I modified the Manifest.mf adding the correct extension points in the plugin.xml attached. But the problem persists.
Furthermore, I have viewed and checkout through SVN the source code of all the discoverers in "svnroot/modelling/org.eclipse.mdt.modisco/" and they do appear in the menu in the image. I have already compare my discoverers with them and although both have the same identical plugin.xml structure and implement (and extend) the same interfaces (and classes) I still can't execute them.
In addition, I have built several discoverers, more and less complex, but with the same result. I used Eclipse Kepler and Juno. Indigo and Helios gave me problems when I installed MoDisco. I used MoDisco 0.8 to 0.10. I am unable to download 11 or 12.
If you wanted, you can see how my plugin.xml is correct as I attached it.
I will be very thankful of any little help.
Thanks in advance,
|
|
|
|
Re: Creating a new discoverer [message #1432692 is a reply to message #1274485] |
Sat, 27 September 2014 11:01  |
Eclipse User |
|
|
|
I am writing this just because if anyone has to face to the same problem, in order I could help him.
The workaround is:
Right click on the discoverer project name on the explorer window view
Chose the option run as...
Go to Eclipse Application (or similar)
And now all the discoverers are in the running Eclipse application
|
|
|
Powered by
FUDForum. Page generated in 0.05498 seconds