Search in sources :

Example 1 with WorkingSetFilterActionGroup

use of org.eclipse.ui.actions.WorkingSetFilterActionGroup in project translationstudio8 by heartsome.

the class WorkingSetActionProvider method init.

public void init(ICommonActionExtensionSite aSite) {
    viewer = (CommonViewer) aSite.getStructuredViewer();
    contentService = aSite.getContentService();
    filterService = (NavigatorFilterService) contentService.getFilterService();
    extensionStateModel = contentService.findStateModel(WorkingSetsContentProvider.EXTENSION_ID);
    workingSetActionGroup = new WorkingSetFilterActionGroup(aSite.getViewSite().getShell(), filterChangeListener);
    workingSetRootModeActionGroup = new WorkingSetRootModeActionGroup(viewer, extensionStateModel);
    topLevelModeListener = new IPropertyChangeListener() {

        public void propertyChange(PropertyChangeEvent event) {
            setWorkingSet(workingSet);
            viewer.getFrameList().reset();
        }
    };
    if (contentService.isActive(WorkingSetsContentProvider.EXTENSION_ID)) {
        managerChangeListener.listen();
        extensionStateModel.addPropertyChangeListener(topLevelModeListener);
    }
    contentService.getActivationService().addExtensionActivationListener(activationListener);
}
Also used : IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) WorkingSetFilterActionGroup(org.eclipse.ui.actions.WorkingSetFilterActionGroup)

Aggregations

IPropertyChangeListener (org.eclipse.jface.util.IPropertyChangeListener)1 PropertyChangeEvent (org.eclipse.jface.util.PropertyChangeEvent)1 WorkingSetFilterActionGroup (org.eclipse.ui.actions.WorkingSetFilterActionGroup)1