Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » add views dynamically when using the compat layer
add views dynamically when using the compat layer [message #1602092] Thu, 05 February 2015 10:13 Go to next message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
Hi,

I am currently trying to get my 3.7 application to run in rcp 4.4 via the compat layer. The application launches but I use views which are added via extensions. This leads to a NullPointerException when calling
pageLayout.getViewLayout(id).setMoveable(isMoveable);
in my Perspective, since
folderLayout.addView(id)
is not able to create a view model via
ModeledPageLayout.createViewModel(..)
because the id does not match any existing partDescriptor's id.

Is there a way to add the view at runtime?
I do not have access to the EPartService, MApplication,... since my class is not known to the application model.
Did I misunderstand something when assuming that the compat layer runs 3.x applications without any major changes?

thanks for your help in advance!
Re: add views dynamically when using the compat layer [message #1608067 is a reply to message #1602092] Mon, 09 February 2015 08:48 Go to previous messageGo to next message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
some clarification:
The views I use are actually added to the extension point org.eclipse.ui.views at runtime. This means that only the currently shown dashlets are registered. Registering those views still works in with rcp 4.4 but the application model does not seem to get updated and therefore knows nothing of them.
As soon as I add views statically to the extension point, the view is known to the application model as part descriptor (my guess is that the compat layer parses the plugin.xml during startup and then never again).

This changes my question to: Can I trigger an update of the compatibility layer's application model at runtime to update the known partDescriptors based on extensions?
Re: add views dynamically when using the compat layer [message #1694884 is a reply to message #1602092] Fri, 08 May 2015 17:19 Go to previous messageGo to next message
jeremy Reese is currently offline jeremy ReeseFriend
Messages: 4
Registered: May 2015
Junior Member
I to am attempting to migrate a 3.7 application to 4.4. We are currently using the internal API to accomplish creating dynamic views and other things. I was reading up about the process used to complete the migration. My understanding is that the comparability layer will not work if we are using internal API classes.

A big part of what we do currently depends on the ability to create views and such dynamically. So any insight on making dynamic views either using just the 4.4 API or converting 3.7 stuff using internal classes would be greatly appreciated.
Re: add views dynamically when using the compat layer [message #1695109 is a reply to message #1694884] Tue, 12 May 2015 06:50 Go to previous message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
I ended up manually adding all possible views into the corresponding plugin.xml files due to lack of responses. Sorry I cannot be of any more help.
Previous Topic:InjectionException on E4 app w/ CompatibilityView
Next Topic:create a part from a PartDescriptor before the Window is shown
Goto Forum:
  


Current Time: Wed Apr 24 22:38:39 GMT 2024

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

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

Back to the top