use of org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor in project n4js by eclipse.
the class N4JSApplicationWorkbenchWindowAdvisor method reviewDisabledCategoriesFromAppModel.
/**
* The 'Show View' dialog behavior slightly changed with E4. Even if the views are properly removed via activities
* (by the unique view IDs) the content provider creates the root category for the unavailable views as well since
* it is using the {@link MApplication}.
*/
private void reviewDisabledCategoriesFromAppModel() {
final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
final MApplication service = workbenchWindow.getService(MApplication.class);
for (Iterator<MPartDescriptor> itr = service.getDescriptors().iterator(); itr.hasNext(); ) /**/
{
final MPartDescriptor descriptor = itr.next();
if (isView(descriptor) && isDisabledView(descriptor)) {
itr.remove();
}
}
}
Aggregations