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 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);

Later,
Paul

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

Back to the top