Home » Modeling » TMF (Xtext) » How to build a plugin?(Just for integration into any exclipse environment)
| |
Re: How to build a plugin? [message #556683 is a reply to message #555858] |
Thu, 02 September 2010 10:33 |
Bodo Messages: 27 Registered: August 2010 |
Junior Member |
|
|
I have tried hard to solve this, but didn't succeed.
I build the jar files via export and just to prove zip-ed all from the workspace (except src).
Nothing works! I checked the plugin be looking at the registery (Window-Show View-Others ... / Plug-in Development -> Plug-in Registery). Noting were in there.
Than I tried a dummy plugin and this works. But the plugin.xml of this is quit different to that of the Xtext generated one!
What shall I do to get the needed jar-file?
Any help is appreciated.
Bodo
PS: plugin.xml and the META-stuff were included.
PPS: If I tried my DSL with invoking Eclipse Application, than there is a registered plugin.
[Updated on: Thu, 02 September 2010 10:36] Report message to a moderator
|
|
| | |
Re: How to build a plugin? [message #556808 is a reply to message #556694] |
Thu, 02 September 2010 16:36 |
Bodo Messages: 27 Registered: August 2010 |
Junior Member |
|
|
Hi Ralf,
thank you very much for your reply. But I am a little confused. I build a sample plug in (after the book 'Eclipse, building commercial-quality plug-ins) and drop this in the plugins folder, and it works!
Ralf Ebert wrote on Thu, 02 September 2010 07:05 | ... Please
note that it's not supported anymore to just throw jars into the plug-in
folder of Eclipse to install things, ...
|
But it seems to be very very complicated, to generate a plug-in jar-file correctly and to install it. I wonder if any other user, already build DSLs, didn't had have this problem and solved them?
What does eclipse do, if I invoke my DSL via ran as->Eclipse Application? Where it fetched all the needed stuff and what exactly is needed?
Please, help
Bodo
|
|
|
Re: How to build a plugin? [message #556814 is a reply to message #556808] |
Thu, 02 September 2010 17:07 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi Ralf
You probably need to do it the correct way.
An Eclipse project is installed via an Update Site
An Update Site contains (a hierarchy of) one or more features
A feature contains one or more plugins and or features
The New Project->Plugin Development wizards will help you create
Feature and Update Site projects.
Regards
Ed Willink
On 02/09/2010 17:36, Bodo wrote:
> Hi Ralf,
>
> thank you very much for your reply. But I am a little confused. I build
> a sample plug in (after the book 'Eclipse, building commercial-quality
> plug-ins) and drop this in the plugins folder, and it works!
> Ralf Ebert wrote on Thu, 02 September 2010 07:05
>> ... Please note that it's not supported anymore to just throw jars
>> into the plug-in folder of Eclipse to install things, ...
>
>
> But it seems to be very very complicated, to generate a plug-in jar-file
> correctly and to install it. I wonder if any other user, already build
> DSLs, didn't had have this problem and solved them?
>
> What does eclipse do, if I invoke my DSL via ran as->Eclipse
> Application? Where it fetched all the needed stuff and what exactly is
> needed?
>
> Please, help
>
> Bodo
>
|
|
|
Re: How to build a plugin? [message #556872 is a reply to message #556808] |
Thu, 02 September 2010 22:41 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
I would use:
- a "template plugin" in source form. Copy that, and generate the code
from a .mydsl into the copy. Generate the template by using one of the
wizards in the Eclipse IDE, and remove sample code.
- a "template feature" in source form. Copy that, and make this feature
depend on the generated plugin (or possible several generated plugins
dependent on your use case). This feature represents what the user see
as "something installable" in the standard p2 ui inside Eclipse, so you
want it categorized appropriately. (It is possible to install bundles
directly using p2, but not easily via the UI - hence the use of a feature).
There are several ways to get from this point to having the features and
plugins in a p2 repository. What I would do is to create an additional
feature that represents the p2 site, and use buckminster to build the p2
repository. This feature basically just has to refer to the features
that you want included in your p2 update site.
How many features you use depends on your use cases (are you generating
one installable thing or several, is it meaningful to install many
etc.), do you want to have an update site with a growing number of
available installable things or do are they available on separate sites,
do you want an aggregate of all of them, do you want a user to be able
to install everything (including eclipse) by visiting just one site, or
do they already have eclipse, etc. etc. (Discussions about things in
this domain are best held in the Buckminster newsgroup)/forum).
The question what eclipse does when you launch a self hosted environment
is that it creates a configuration based on what you have in your target
platform, and what has been built in your workspace and then launches
that. You have control over how this is done in a launch configuration.
It is not doing a proper install of things, following dependencies etc.
you have to make sure everything required is included (which is most
often the case if using everything in the TP + workspace since you
managed to build what was there).
There are other alternative approaches - if you want code in .mydsl's to
be immediately runnable in the IDE used to edit/build them, you could
instead use an interpreter, or use ASM to generate byte codes, use
dynamically generated classes that you load yourself, or you could
generate javascript since there is good integration between java and JS.
For Eclipse b3 (the language I am developing) I picked the byte code
generation approach as what I wanted to do, but I started with an
interpreter/evaluator as it is a much convenient starting point and
easier to debug. In my case it is typically not meaningful for someone
to install what they have expressed in a .b3 file.
I hope this gives you some pointers to how you can proceed.
Regards
- henrik
On 9/2/10 6:36 PM, Bodo wrote:
> Hi Ralf,
>
> thank you very much for your reply. But I am a little confused. I build
> a sample plug in (after the book 'Eclipse, building commercial-quality
> plug-ins) and drop this in the plugins folder, and it works!
> Ralf Ebert wrote on Thu, 02 September 2010 07:05
>> ... Please note that it's not supported anymore to just throw jars
>> into the plug-in folder of Eclipse to install things, ...
>
>
> But it seems to be very very complicated, to generate a plug-in jar-file
> correctly and to install it. I wonder if any other user, already build
> DSLs, didn't had have this problem and solved them?
>
> What does eclipse do, if I invoke my DSL via ran as->Eclipse
> Application? Where it fetched all the needed stuff and what exactly is
> needed?
>
> Please, help
>
> Bodo
>
|
|
|
Goto Forum:
Current Time: Sat Apr 27 04:15:11 GMT 2024
Powered by FUDForum. Page generated in 0.03342 seconds
|