Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Integration of XWT in an e4 application
Integration of XWT in an e4 application [message #711969] Sat, 06 August 2011 22:07 Go to next message
Bruno Missing name is currently offline Bruno Missing nameFriend
Messages: 16
Registered: March 2011
Junior Member
how can I integrate XWT files in an e4-RCP application? The XWT examples I found only work with Java projects.

How can I inform the application about the XWT file?

Re: Integration of XWT in an e4 application [message #716632 is a reply to message #711969] Wed, 17 August 2011 23:21 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 41
Registered: July 2011
Hi, I'm also curious about this topic.

I used XWT like following code in my App.
This works but I'm not sure whether this is the right way.

I'm just new to e4 application, so please correct me if I'm wrong.

	private final Composite parent;
	public MyPart(Composite parent) {
		this.parent = parent;

	public void buildUI(){
		parent.setLayout(new FillLayout());
		IOUtil.XWTload(getClass(), parent, "MyPart.xwt", ItemHolder.getInstance());

	public static void changeCurrentThreadClassLoader(Class clazz){

	public static void revertCurrentThreadClassLoader(){

	public static Object XWTload(Class clazz,Composite parent, String xwtFile, Object dataContext){
		ClassLoader myLoader    = clazz.getClassLoader();

		Object loadModule = null;
		try {
				loadModule =  XWT.load(parent,clazz.getResource(xwtFile));
			} else {
				loadModule =  XWT.load(parent,clazz.getResource(xwtFile),dataContext);
		} catch (Exception e) {
		} finally{

		return loadModule;

I put "MyPart.xwt" and "" in the same directory.


[Updated on: Sun, 15 January 2012 23:16]

Report message to a moderator

Re: Integration of XWT in an e4 application [message #730430 is a reply to message #716632] Wed, 28 September 2011 11:50 Go to previous message
Alexey Romanov is currently offline Alexey RomanovFriend
Messages: 263
Registered: May 2010
Senior Member
Note that "New e4 Static Part" and "New e4 Dynamic Part" under the "New" menu are added by the XWT perspective (and are under XWT folder if you use "File > New > Other"). They are probably relevant (I am just using XWT in Eclipse 3.x RCP at the moment, so I am not sure).
Previous Topic:How to create an dynamic Menu in e4
Next Topic:When Processor method is called ?
Goto Forum:

Current Time: Thu Sep 24 12:54:43 GMT 2020

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

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

Back to the top