Search in sources :

Example 6 with ISourceProviderService

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

the class ArchiveView method isZoomClearEnabled.

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

Example 7 with ISourceProviderService

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

the class ArchiveView method setZoomInEnabled.

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

Example 8 with ISourceProviderService

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

the class ArchiveView method setZoomClearEnabled.

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

Example 9 with ISourceProviderService

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

the class ArchiveView method setTagEnabled.

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

Example 10 with ISourceProviderService

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

the class ArchiveView method isZoomOutEnabled.

public boolean isZoomOutEnabled() {
    IWorkbenchWindow window = getViewSite().getWorkbenchWindow();
    ISourceProviderService service = (ISourceProviderService) window.getService(ISourceProviderService.class);
    ZoomOutStateProvider commandState = (ZoomOutStateProvider) service.getSourceProvider(ZoomOutStateProvider.STATE_KEY_ENABLED);
    return (Boolean) commandState.getCurrentState().get(ZoomOutStateProvider.STATE_KEY_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