2014-12-01 92 views
0

我正在使用eclipse插件,我需要以编程方式调整项目资源管理器。以编程方式定制eclipse项目资源管理器

我想取消选择项目浏览器中的“内容扩展”。手动操作非常简单,在下面的post中描述。但如何以编程方式做到这一点?

编辑: 现在我可以看到,如果它的活性或没有,但我仍然无法找到的API来改变这种

IWorkbenchPage page = PlatformUI.getWorkbench() 
        .getActiveWorkbenchWindow().getActivePage(); 
IViewPart view = page.findView(IPageLayout.ID_PROJECT_EXPLORER);     

ProjectExplorer expl = (ProjectExplorer) page 
        .findView(IPageLayout.ID_PROJECT_EXPLORER); 
INavigatorContentService content = expl.getNavigatorContentService(); 
content.isActive(ID); 

回答

0

它做使用从内容服务

IWorkbenchPage page = PlatformUI.getWorkbench() 
        .getActiveWorkbenchWindow().getActivePage();     
ProjectExplorer expl = (ProjectExplorer) page 
        .findView(IPageLayout.ID_PROJECT_EXPLORER);    
INavigatorContentService content = expl.getNavigatorContentService();    
content.getActivationService().deactivateExtensions(new String[] {ID}, false); 
的ACTICATION服务
相关问题