pane.setCenter(list);
}
void handleOpen() {
MPartStack stack = (MPartStack) modelService.find("content.stack", perspective);
Media m = list.getSelectionModel().getSelectedItem();
if( m != null ) {
String instance = Media.serialize(m);
for( MStackElement e : stack.getChildren() ) {
if( e instanceof MPart ) {
if( instance.equals(e.getPersistedState().get(MediaPart.MEDIA_OBJECT_KEY)) ) {
partService.activate((MPart) e);
return;
}
}
}
MPart p = MBasicFactory.INSTANCE.createPart();
p.setLabel(m.getName());
if( m.getType() == MediaType.MOVIE ) {
p.setIconURI("platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/22/kaffeine.png");
} else if( m.getType() == MediaType.PICTURE ) {
p.setIconURI("platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/22/games-config-background.png");
} else {
p.setIconURI("platform:/plugin/at.bestsolution.efxclipse.runtime.examples.media/icons/22/player-volume.png");
}