How to remove QuickAccess field from your Eclipse application

Sometimes we need to remove the QuickAccess widget from Eclipse RCP application. Even after following below steps Ctrl + 3 will work.





Add these dependency in your eclipse rcp plugin

 org.eclipse.e4.ui.model.workbench  
 org.eclipse.e4.ui.workbench  
 org.eclipse.e4.core.contexts  









In ApplicationWorkbenchWindowAdvisor, in postWindowOpen add these statements at end

 IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();  
 if (window instanceof WorkbenchWindow) {  
    MWindow mWindow = ((WorkbenchWindow) window).getModel();  
    EModelService modelService = mWindow.getContext().get(EModelService.class);  
    MToolControl searchField = (MToolControl)modelService.find("SearchField", mWindow);  
    if (searchField != null) {  
         searchField.setToBeRendered(false);  
    }  
 }  

Comments

Popular posts from this blog

Comparison of Cloud Services

When to use Import-Package and Require-Bundle in Eclipse Plugin?