Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » jar in Editor-Plugin
jar in Editor-Plugin [message #1225361] Sun, 29 December 2013 15:18 Go to next message
Philip Schledermann is currently offline Philip SchledermannFriend
Messages: 5
Registered: December 2013
Junior Member
Hi,

currently I'm on xtext 2.4.3, and I want to include a jar in the Editorplugin.
I tried importing it in the ui project part, and adding it to the build path in the plugin.xml. But the jar doesn't appear in the package.
Is there anything to adapt in the plugin.xml or in the wizard environment?

The whole thing is about referencing this jar, that contains an external validator, in a java-file in the src-gen folder. Maybe someone has also a more elegant way for doing this. Wink

Thanks for the help!
Re: jar in Editor-Plugin [message #1225691 is a reply to message #1225361] Mon, 30 December 2013 14:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi you have to add it in the Build.properties and in the manifest (runtime tab/classpath section)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 30 December 2013 15:10]

Report message to a moderator

Re: jar in Editor-Plugin [message #1225710 is a reply to message #1225691] Mon, 30 December 2013 15:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
P.S: if the other project/thingy is a plugin project too (can can convert a java project to a such)
you can simply add a dependency (require bundle)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: jar in Editor-Plugin [message #1225743 is a reply to message #1225361] Mon, 30 December 2013 16:57 Go to previous message
Philip Schledermann is currently offline Philip SchledermannFriend
Messages: 5
Registered: December 2013
Junior Member
Hi Christian,

thank you very much for you help!

I tried the steps you mentioned first with no success.
The tip to convert the jar into a plugin project helped.

But I had to add the ui project package to the XyzProjectCreator.java:
	protected List<String> getRequiredBundles() {
		List<String> result = Lists.newArrayList(super.getRequiredBundles());
		result.add("path.to.project.name.ui");
		result.add(DSL_GENERATOR_PROJECT_NAME);
		return result;
	}


This isn't elegant, because the whole ui project is included in the Editor dependencies, but works for the moment.
Previous Topic:How to load and parse a language file inside an OSGi bundle
Next Topic:Invalid 'import is never used' warning for annotations
Goto Forum:
  


Current Time: Thu Apr 18 09:14:04 GMT 2024

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

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

Back to the top