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);
}
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);
});
}
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);
});
}
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);
});
}
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);
}
Aggregations