Java Code Examples for org.eclipse.ui.navigator.ICommonActionExtensionSite#getStructuredViewer()

The following examples show how to use org.eclipse.ui.navigator.ICommonActionExtensionSite#getStructuredViewer() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RemoteConnectionActionProvider.java    From codewind-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Override
public void init(ICommonActionExtensionSite aSite) {
	super.init(aSite);
	selProvider = aSite.getStructuredViewer();
	newProjectAction = new NewProjectAction(selProvider);
	bindAction = new BindAction(selProvider);
	manageRegistriesAction = new ManageRegistriesAction(selProvider);
	manageReposAction = new ManageReposAction(selProvider);
	connectDisconnectAction = new ConnectDisconnectAction(selProvider);
	editConnectionAction = new EditConnectionAction(selProvider);
	removeConnectionAction = new RemoveConnectionAction(selProvider);
	remoteDoubleClickAction = new RemoteDoubleClickAction(selProvider);
	openTektonDashboardAction = new OpenTektonDashboardAction(selProvider);
	logLevelAction = new LogLevelAction(selProvider);
	diagnosticsAction = new DiagnosticsAction(selProvider);
}
 
Example 2
Source File: CodewindApplicationActionProvider.java    From codewind-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Override
    public void init(ICommonActionExtensionSite aSite) {
        super.init(aSite);
        selProvider = aSite.getStructuredViewer();
//        validateAction = new ValidateAction(selProvider);
        restartRunAction = new RestartRunModeAction(selProvider);
        restartDebugAction = new RestartDebugModeAction(selProvider);
        attachDebuggerAction = new AttachDebuggerAction(selProvider);
        openAppMonitorAction = new OpenAppMonitorAction(selProvider);
        openPerfMonitorAction = new OpenPerfMonitorAction(selProvider);
        containerShellAction = new ContainerShellAction(selProvider);
        enableDisableAutoBuildAction = new EnableDisableAutoBuildAction(selProvider);
        enableDisableInjectMetricsAction = new EnableDisableInjectMetricsAction(selProvider);
        enableDisableProjectAction = new EnableDisableProjectAction(selProvider);
        unbindProjectAction = new UnbindProjectAction(selProvider);
        openAppAction = new OpenAppAction(selProvider);
        openAppOverviewAction = new OpenAppOverviewAction(selProvider);
        showAllLogsAction = new ShowAllLogsAction();
        hideAllLogsAction = new HideAllLogsAction();
        importProjectAction = new ImportProjectAction(selProvider);
        startBuildAction = new StartBuildAction(selProvider);
        openAppDoubleClickAction = new OpenAppDoubleClickAction(selProvider);
        manageLinksAction = new ManageLinksAction(selProvider);
    }
 
Example 3
Source File: WorkingSetActionProvider.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
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);
}
 
Example 4
Source File: WorkingSetActionProvider.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
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);
}
 
Example 5
Source File: LocalConnectionActionProvider.java    From codewind-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void init(ICommonActionExtensionSite aSite) {
    super.init(aSite);
    selProvider = aSite.getStructuredViewer();
    newProjectAction = new NewProjectAction(selProvider);
    bindAction = new BindAction(selProvider);
    manageRegistriesAction = new ManageRegistriesAction(selProvider);
    manageReposAction = new ManageReposAction(selProvider);
    installUninstallAction = new InstallerAction(ActionType.INSTALL_UNINSTALL, selProvider);
    startStopAction = new InstallerAction(ActionType.START_STOP, selProvider);
    doubleClickAction = new LocalDoubleClickAction(selProvider);
    logLevelAction = new LogLevelAction(selProvider);
    diagnosticsAction = new DiagnosticsAction(selProvider);
}
 
Example 6
Source File: RootActionProvider.java    From codewind-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void init(ICommonActionExtensionSite aSite) {
    super.init(aSite);
    ISelectionProvider selProvider = aSite.getStructuredViewer();
    openAppAction = new OpenAppAction(selProvider);
    restartRunAction = new RestartRunModeAction(selProvider);
    restartDebugAction = new RestartDebugModeAction(selProvider);
}
 
Example 7
Source File: CodewindActionProvider.java    From codewind-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void init(ICommonActionExtensionSite aSite) {
    super.init(aSite);
    selProvider = aSite.getStructuredViewer();
    openWelcomePageAction = new OpenWelcomePageAction(selProvider);
    addConnectionAction = new AddConnectionAction(selProvider);
}
 
Example 8
Source File: BugActionProvider.java    From spotbugs with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void init(ICommonActionExtensionSite aSite) {
    site = aSite;
    super.init(aSite);
    final StructuredViewer viewer = aSite.getStructuredViewer();
    final BugContentProvider provider = BugContentProvider.getProvider(site.getContentService());

    filterChangeListener = new IPropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            if (!initDone) {
                return;
            }
            IWorkingSet oldWorkingSet = provider.getCurrentWorkingSet();
            IWorkingSet oldWorkingSet1 = (IWorkingSet) event.getOldValue();
            IWorkingSet newWorkingSet = (IWorkingSet) event.getNewValue();
            if (newWorkingSet != null && (oldWorkingSet == newWorkingSet || oldWorkingSet1 == newWorkingSet)) {
                return;
            }
            if (viewer != null) {
                provider.setCurrentWorkingSet(newWorkingSet);
                if (newWorkingSet == null) {
                    viewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
                } else if (oldWorkingSet != newWorkingSet) {
                    viewer.setInput(newWorkingSet);
                }
            }
        }
    };


    workingSetActionGroup = new WorkingSetFilterActionGroup(aSite.getViewSite().getShell(), filterChangeListener);
    if (provider == null)
        throw new NullPointerException("no provider");
    workingSetActionGroup.setWorkingSet(provider.getCurrentWorkingSet());
    doubleClickAction = new MyAction();
    // only if doubleClickAction must know tree selection:
    viewer.addSelectionChangedListener(doubleClickAction);
    initDone = true;
}
 
Example 9
Source File: GotoActionProvider.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
public void init(ICommonActionExtensionSite anActionSite) {
	gotoAction = new GotoResourceAction(anActionSite.getViewSite().getShell(), (CommonViewer)anActionSite.getStructuredViewer());
}
 
Example 10
Source File: GoIntoActionProvider.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
public void init(ICommonActionExtensionSite anActionSite) {
	anActionSite.getViewSite().getShell();
	CommonViewer viewer = (CommonViewer) anActionSite.getStructuredViewer();
	goIntoAction = new GoIntoAction(viewer.getFrameList());
}
 
Example 11
Source File: GotoActionProvider.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
public void init(ICommonActionExtensionSite anActionSite) {
	gotoAction = new GotoResourceAction(anActionSite.getViewSite().getShell(), (CommonViewer)anActionSite.getStructuredViewer());
}
 
Example 12
Source File: GoIntoActionProvider.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
public void init(ICommonActionExtensionSite anActionSite) {
	anActionSite.getViewSite().getShell();
	CommonViewer viewer = (CommonViewer) anActionSite.getStructuredViewer();
	goIntoAction = new GoIntoAction(viewer.getFrameList());
}