Search in sources :

Example 66 with ExecutionException

use of org.eclipse.core.commands.ExecutionException in project yamcs-studio by yamcs.

the class SwitchProcessorCompoundContributionItem method updateSelection.

private void updateSelection() {
    IWorkbench workbench = PlatformUI.getWorkbench();
    ICommandService commandService = (ICommandService) workbench.getService(ICommandService.class);
    Command command = commandService.getCommand(SWITCH_PROCESSOR_COMMAND);
    try {
        ProcessorInfo currentProcessor = ManagementCatalogue.getInstance().getCurrentProcessorInfo();
        HandlerUtil.updateRadioState(command, currentProcessor.getName());
    } catch (ExecutionException e) {
        log.log(Level.SEVERE, "Could not update radio state", e);
    }
}
Also used : IWorkbench(org.eclipse.ui.IWorkbench) ProcessorInfo(org.yamcs.protobuf.YamcsManagement.ProcessorInfo) Command(org.eclipse.core.commands.Command) ExecutionException(org.eclipse.core.commands.ExecutionException) ICommandService(org.eclipse.ui.commands.ICommandService)

Aggregations

ExecutionException (org.eclipse.core.commands.ExecutionException)66 CoreException (org.eclipse.core.runtime.CoreException)20 IFile (org.eclipse.core.resources.IFile)15 ArrayList (java.util.ArrayList)13 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)13 IStatus (org.eclipse.core.runtime.IStatus)12 Shell (org.eclipse.swt.widgets.Shell)12 Status (org.eclipse.core.runtime.Status)11 IEditorPart (org.eclipse.ui.IEditorPart)11 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)10 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)9 InvocationTargetException (java.lang.reflect.InvocationTargetException)8 ISelection (org.eclipse.jface.viewers.ISelection)8 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)8 File (java.io.File)7 List (java.util.List)7 XLFHandler (net.heartsome.cat.ts.core.file.XLFHandler)7 XLIFFEditorImplWithNatTable (net.heartsome.cat.ts.ui.xliffeditor.nattable.editor.XLIFFEditorImplWithNatTable)7 IProject (org.eclipse.core.resources.IProject)7 FileEditorInput (org.eclipse.ui.part.FileEditorInput)7