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