Search in sources :

Example 1 with ISourceProviderService

use of org.eclipse.ui.services.ISourceProviderService in project yamcs-studio by yamcs.

the class YamcsUIPlugin method doUpdateGlobalProcessingState.

private void doUpdateGlobalProcessingState(IWorkbench workbench, ProcessorInfo processorInfo) {
    ISourceProviderService service = (ISourceProviderService) workbench.getService(ISourceProviderService.class);
    ProcessorStateProvider state = (ProcessorStateProvider) service.getSourceProvider(ProcessorStateProvider.STATE_KEY_PROCESSING);
    state.updateState(processorInfo);
}
Also used : ProcessorStateProvider(org.yamcs.studio.core.ui.processor.ProcessorStateProvider) ISourceProviderService(org.eclipse.ui.services.ISourceProviderService)

Example 2 with ISourceProviderService

use of org.eclipse.ui.services.ISourceProviderService in project yamcs-studio by yamcs.

the class ArchiveView method isZoomInEnabled.

public boolean isZoomInEnabled() {
    IWorkbenchWindow window = getViewSite().getWorkbenchWindow();
    ISourceProviderService service = (ISourceProviderService) window.getService(ISourceProviderService.class);
    ZoomInStateProvider commandState = (ZoomInStateProvider) service.getSourceProvider(ZoomInStateProvider.STATE_KEY_ENABLED);
    return (Boolean) commandState.getCurrentState().get(ZoomInStateProvider.STATE_KEY_ENABLED);
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ISourceProviderService(org.eclipse.ui.services.ISourceProviderService)

Example 3 with ISourceProviderService

use of org.eclipse.ui.services.ISourceProviderService in project yamcs-studio by yamcs.

the class ArchiveView method setZoomOutEnabled.

public void setZoomOutEnabled(boolean enabled) {
    // Back to the SWT thread, to be sure
    Display.getDefault().asyncExec(() -> {
        IWorkbenchWindow window = getViewSite().getWorkbenchWindow();
        ISourceProviderService service = (ISourceProviderService) window.getService(ISourceProviderService.class);
        ZoomOutStateProvider commandState = (ZoomOutStateProvider) service.getSourceProvider(ZoomOutStateProvider.STATE_KEY_ENABLED);
        commandState.setEnabled(enabled);
    });
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ISourceProviderService(org.eclipse.ui.services.ISourceProviderService)

Example 4 with ISourceProviderService

use of org.eclipse.ui.services.ISourceProviderService in project yamcs-studio by yamcs.

the class ArchiveView method isTagEnabled.

public boolean isTagEnabled() {
    IWorkbenchWindow window = getViewSite().getWorkbenchWindow();
    ISourceProviderService service = (ISourceProviderService) window.getService(ISourceProviderService.class);
    AnnotateRangeStateProvider commandState = (AnnotateRangeStateProvider) service.getSourceProvider(AnnotateRangeStateProvider.STATE_KEY_ENABLED);
    return (Boolean) commandState.getCurrentState().get(AnnotateRangeStateProvider.STATE_KEY_ENABLED);
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ISourceProviderService(org.eclipse.ui.services.ISourceProviderService)

Example 5 with ISourceProviderService

use of org.eclipse.ui.services.ISourceProviderService in project yamcs-studio by yamcs.

the class ArchiveView method setRefreshEnabled.

public void setRefreshEnabled(boolean enabled) {
    // Back to the SWT thread, to be sure
    Display.getDefault().asyncExec(() -> {
        IWorkbenchWindow window = getViewSite().getWorkbenchWindow();
        ISourceProviderService service = (ISourceProviderService) window.getService(ISourceProviderService.class);
        RefreshStateProvider commandState = (RefreshStateProvider) service.getSourceProvider(RefreshStateProvider.STATE_KEY_ENABLED);
        commandState.setEnabled(enabled);
    });
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ISourceProviderService(org.eclipse.ui.services.ISourceProviderService)

Aggregations

ISourceProviderService (org.eclipse.ui.services.ISourceProviderService)12 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)10 Dimension (java.awt.Dimension)1 ComponentAdapter (java.awt.event.ComponentAdapter)1 ComponentEvent (java.awt.event.ComponentEvent)1 LocalResourceManager (org.eclipse.jface.resource.LocalResourceManager)1 ResourceManager (org.eclipse.jface.resource.ResourceManager)1 Font (org.eclipse.swt.graphics.Font)1 FontData (org.eclipse.swt.graphics.FontData)1 FillLayout (org.eclipse.swt.layout.FillLayout)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Button (org.eclipse.swt.widgets.Button)1 Composite (org.eclipse.swt.widgets.Composite)1 DateTime (org.eclipse.swt.widgets.DateTime)1 Label (org.eclipse.swt.widgets.Label)1 ProcessorStateProvider (org.yamcs.studio.core.ui.processor.ProcessorStateProvider)1