Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problem by using ExecutableExtensionFactory in non-XText Plugin
Problem by using ExecutableExtensionFactory in non-XText Plugin [message #1713233] Mon, 02 November 2015 15:56 Go to next message
Jiang Li is currently offline Jiang LiFriend
Messages: 27
Registered: November 2014
Junior Member
I want to customize the project "*.mydsl.ui" by adding some handlers into plugin.xml. Because these handlers use injector, I added prefix "MydslExecutableExtensionFactory:" in the extension points. Everything works well.

But it makes the "plugin.xml" dirty, I think it isn't a good idea. Sometimes we will use "plugin.xml_gen" to replace "plugin.xml".

So I created a new plugin"*.mydsl.ui.extension" for the customizing. All of the handlers will be added into the plugin.xml of "*.mydsl.ui.extension" instead of "*.mydsl.ui". Prefix "MydslExecutableExtensionFactory:" is still used. But it raised the ClassNotFoundException. I'm sure that class "MydslExecutableExtensionFactory" is visible in "*.mydsl.ui.extension".

Can anybody tell me why?
Re: Problem by using ExecutableExtensionFactory in non-XText Plugin [message #1713304 is a reply to message #1713233] Tue, 03 November 2015 09:08 Go to previous messageGo to next message
Stefan Oehme is currently offline Stefan OehmeFriend
Messages: 159
Registered: April 2010
Location: Kiel
Senior Member

Hi Jiang,

I would suggest putting your custom logic into the .ui project. Just add it all to the end of the plugin.xml file, separated by a comment.

Then, don't replace plugin.xml with plugin.xml_gen. but use the Compare Editor to move changes from one to the other.

If you want to use the ExecutableExtensionFactory of the ui plugin in another bundle, then your mydsl.ui package needs to be exported. Also, that other bundle would need to be a fragment so that the ExecutableExtensionFactory can see the classes in it. Much more complicated than just merging the plugin.xml I would say =)

Cheers,
Stefan
Re: Problem by using ExecutableExtensionFactory in non-XText Plugin [message #1713369 is a reply to message #1713304] Tue, 03 November 2015 15:47 Go to previous messageGo to next message
Jiang Li is currently offline Jiang LiFriend
Messages: 27
Registered: November 2014
Junior Member
Hi Stefan,

i have already exported the package "src-gen/mydsl.ui" which contains "MydslExcutableExtensionFactory.java". But it doesn't work. Do you mean that all packages of project "mydsl.ui" should be exported?

Regards

Jiang
Re: Problem by using ExecutableExtensionFactory in non-XText Plugin [message #1714450 is a reply to message #1713369] Thu, 12 November 2015 18:18 Go to previous message
Stefan Oehme is currently offline Stefan OehmeFriend
Messages: 159
Registered: April 2010
Location: Kiel
Senior Member

Hi Jiang,

the ExtensionFactory also needs to see the types in the downstream project. That means the downstream project needs to be a fragment for the .ui plugin.

But as I said, you don't have a good reason to split the project. Just use the Compare Editor to merge changes from the plugin.xml_gen.

Cheers,
Stefan
Previous Topic:How to test a formatting with xtend?
Next Topic:checksum validation failed for some Xtext Maven artifacts and corresponding problems
Goto Forum:
  


Current Time: Sat Apr 20 16:20:16 GMT 2024

Powered by FUDForum. Page generated in 0.03298 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top