Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Re-use of View in Dialog

On Tue, Mar 16, 2010 at 10:23 PM, Lars Vogel <lars.vogel@xxxxxxxxxxxxxx> wrote:
> Thank Remy, I'll give it a try .

Here is the code which I just tested.

// create a detached window
MWindow detachedWindow = MApplicationFactory.eINSTANCE.createWindow();
// attach it to the main/parent window
parentWindow.getChildren().add(detachedWindow);

// find the part to move
MPart detailsView = partService.findPart("DetailsView");
// technically you don't have to remove it because EMF will remove it
detailsView.getParent().getChildren().remove(detailsView);
// move the part to the new window
detachedWindow.getChildren().add(detailsView);

// set a desired size
detachedWindow.setX(400);
detachedWindow.setY(300);

Regards,
Remy

----------
Remy Suen
Eclipse Platform/UI Committer
IBM Ottawa
613-356-5162


Back to the top