Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Migrate/Update existing perspective


On 07/17/2014 10:32 PM, Paul Webster wrote:
On Thu, Jul 10, 2014 at 6:25 AM, Simon Schäfer <mail@xxxxxxxxxxxxxxxxxxx> wrote:
I'm not very familiar with all these classes and couldn't find out how I now add new entries to MPerspective and make that change persistent afterwards, do you have an example somewhere that shows how this can be done?

See org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout.addNewWizardShortcut(String) for an example of the specific change you want to make.  it'll be persisted when the model is persisted.


For finding the MPerspective, you probably want something like:

EModelService modelService = window.getService(EModelService.class);
MApplication app = window.getService(MApplication.class);

List<MPerspective> perspectives = modelService.findElements(app, "your.perspective.id", MPerspective.class, null);
Hi Paul,

Thank you very much for your help. I finally found the time to look into this and could get it to work, with one minor flaw left: The "auto enable new wizard" code is executed every time on Eclipse startup, which means that if a user disables the wizard later (for whatever reason they should do it), it is enabled again on the next startup. How do you generally detect that a plugin has changed and therefore its configuration may have changed and needs to be updated? I could simply create a preference that is set after the code is run the first time but maybe you already have a solution made for this particular task.

Simon

Later,
Paul

--
Paul Webster
Hi floor.  Make me a sammich! - GIR


_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev


Back to the top