2014-12-01 90 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服務
相關問題