CompilePdfStartedEvent.Data data = event.getData();
eventBus_.fireEvent(new CompilePdfStartedEvent(data));
}
else if (type.equals(ClientEvent.CompilePdfOutputEvent))
{
CompileOutput output = event.getData();
eventBus_.fireEvent(new CompilePdfOutputEvent(output));
}
else if (type.equals(ClientEvent.CompilePdfErrorsEvent))
{
JsArray<CompileError> data = event.getData();
eventBus_.fireEvent(new CompilePdfErrorsEvent(data));
}
else if (type.equals(ClientEvent.CompilePdfCompletedEvent))
{
CompilePdfResult result = event.getData();
eventBus_.fireEvent(new CompilePdfCompletedEvent(result));
}
else if (type.equals(ClientEvent.SynctexEditFile))
{
SourceLocation sourceLocation = event.getData();
eventBus_.fireEvent(new SynctexEditFileEvent(sourceLocation));
}
else if (type.equals(ClientEvent.FindResult))
{
FindResultEvent.Data data = event.getData();
eventBus_.fireEvent(new FindResultEvent(
data.getHandle(), data.getResults().toArrayList()));
}
else if (type.equals(ClientEvent.FindOperationEnded))
{
String data = event.getData();
eventBus_.fireEvent(new FindOperationEndedEvent(data));
}
else if (type.equals(ClientEvent.RPubsUploadStatus))
{
RPubsUploadStatusEvent.Status status = event.getData();
eventBus_.fireEvent(new RPubsUploadStatusEvent(status));
}
else if (type.equals(ClientEvent.BuildStarted))
{
eventBus_.fireEvent(new BuildStartedEvent());
}
else if (type.equals(ClientEvent.BuildOutput))
{
CompileOutput data = event.getData();
eventBus_.fireEvent(new BuildOutputEvent(data));
}
else if (type.equals(ClientEvent.BuildCompleted))
{
BuildCompletedEvent.Data data = event.getData();
eventBus_.fireEvent(new BuildCompletedEvent(data));
}
else if (type.equals(ClientEvent.BuildErrors))
{
BuildErrorsEvent.Data data = event.getData();
eventBus_.fireEvent(new BuildErrorsEvent(data));
}
else if (type.equals(ClientEvent.DirectoryNavigate))
{
DirectoryNavigateEvent.Data data = event.getData();
eventBus_.fireEvent(new DirectoryNavigateEvent(data));
}
else if (type.equals(ClientEvent.DeferredInitCompleted))
{
eventBus_.fireEvent(new DeferredInitCompletedEvent());
}
else if (type.equals(ClientEvent.PlotsZoomSizeChanged))
{
PlotsZoomSizeChangedEvent.Data data = event.getData();
eventBus_.fireEvent(new PlotsZoomSizeChangedEvent(data));
}
else if (type.equals(ClientEvent.SourceCppStarted))
{
eventBus_.fireEvent(new SourceCppStartedEvent());
}
else if (type.equals(ClientEvent.SourceCppCompleted))
{
SourceCppState state = event.getData();
eventBus_.fireEvent(new SourceCppCompletedEvent(state));
}
else if (type.equals(ClientEvent.LoadedPackageUpdates))
{
String installCmd = event.getData();
eventBus_.fireEvent(new LoadedPackageUpdatesEvent(installCmd));
}
else if (type.equals(ClientEvent.ActivatePane))
{
String pane = event.getData();
eventBus_.fireEvent(new ActivatePaneEvent(pane));
}
else if (type.equals(ClientEvent.ShowPresentationPane))
{
PresentationState state = event.getData();
eventBus_.fireEvent(new ShowPresentationPaneEvent(state));
}
else if (type.equals(ClientEvent.EnvironmentRefresh))
{
eventBus_.fireEvent(new EnvironmentRefreshEvent());
}
else if (type.equals(ClientEvent.ListChanged))
{
eventBus_.fireEvent(new ListChangedEvent(event.<JsObject>getData()));
}
else if (type.equals(ClientEvent.UiPrefsChanged))
{
UiPrefsChangedEvent.Data data = event.getData();
eventBus_.fireEvent(new UiPrefsChangedEvent(data));
}
else if (type.equals(ClientEvent.ContextDepthChanged)) {
EnvironmentContextData data = event.getData();
eventBus_.fireEvent(new ContextDepthChangedEvent(data, true));
}
else if (type.equals(ClientEvent.HandleUnsavedChanges))
{
eventBus_.fireEvent(new HandleUnsavedChangesEvent());
}
else if (type.equals(ClientEvent.Quit))
{
boolean switchProjects = event.<Bool>getData().getValue();
eventBus_.fireEvent(new QuitEvent(switchProjects));
}
else if (type.equals(ClientEvent.Suicide))
{
// NOTE: we don't explicitly stop listening for events here
// for the reasons cited above in ClientEvent.Quit
// fire event
String message = event.getData();
eventBus_.fireEvent(new SuicideEvent(message));
}
else if (type.equals(ClientEvent.SaveActionChanged))
{
SaveAction action = event.getData();
eventBus_.fireEvent(new SaveActionChangedEvent(action));
}
else if (type.equals(ClientEvent.EnvironmentAssigned))
{
RObject objectInfo = event.getData();
eventBus_.fireEvent(new EnvironmentObjectAssignedEvent(objectInfo));
}
else if (type.equals(ClientEvent.EnvironmentRemoved))
{
String objectName = event.getData();
eventBus_.fireEvent(new EnvironmentObjectRemovedEvent(objectName));
}
else if (type.equals(ClientEvent.BrowserLineChanged))
{
LineData lineData = event.getData();
eventBus_.fireEvent(new BrowserLineChangedEvent(lineData));
}
else if (type.equals(ClientEvent.PackageLoaded))
{
eventBus_.fireEvent(new PackageLoadedEvent(
(String)event.getData()));
}
else if (type.equals(ClientEvent.PackageUnloaded))
{
eventBus_.fireEvent(new PackageUnloadedEvent(
(String)event.getData()));
}
else if (type.equals(ClientEvent.PresentationPaneRequestCompleted))
{
eventBus_.fireEvent(new PresentationPaneRequestCompletedEvent());
}
else if (type.equals(ClientEvent.UnhandledError))
{
UnhandledError err = event.getData();
eventBus_.fireEvent(new UnhandledErrorEvent(err));
}
else if (type.equals(ClientEvent.ErrorHandlerChanged))
{
ErrorHandlerType handlerType = event.getData();
eventBus_.fireEvent(new ErrorHandlerChangedEvent(handlerType));
}
else if (type.equals(ClientEvent.ViewerNavigate))
{
ViewerNavigateEvent.Data data = event.getData();
eventBus_.fireEvent(new ViewerNavigateEvent(data));
}
else if (type.equals(ClientEvent.SourceExtendedTypeDetected))
{
SourceExtendedTypeDetectedEvent.Data data = event.getData();
eventBus_.fireEvent(new SourceExtendedTypeDetectedEvent(data));
}
else if (type.equals(ClientEvent.ShinyViewer))
{
ShinyApplicationParams data = event.getData();
eventBus_.fireEvent(new ShinyApplicationStatusEvent(data));
}
else if (type.equals(ClientEvent.DebugSourceCompleted))
{
DebugSourceResult result = (DebugSourceResult)event.getData();
eventBus_.fireEvent(new DebugSourceCompletedEvent(result));
}
else if (type.equals(ClientEvent.RmdRenderStarted))
{
RmdRenderStartedEvent.Data data = event.getData();
eventBus_.fireEvent(new RmdRenderStartedEvent(data));
}
else if (type.equals(ClientEvent.RmdRenderOutput))
{
CompileOutput data = event.getData();
eventBus_.fireEvent(new RmdRenderOutputEvent(data));
}
else if (type.equals(ClientEvent.RmdRenderCompleted))
{
RmdRenderResult result = event.getData();
eventBus_.fireEvent(new RmdRenderCompletedEvent(result));
}
else if (type.equals(ClientEvent.RmdTemplateDiscovered))
{
RmdDiscoveredTemplate template = event.getData();
eventBus_.fireEvent(new RmdTemplateDiscoveredEvent(template));
}
else if (type.equals(ClientEvent.RmdTemplateDiscoveryCompleted))
{
eventBus_.fireEvent(new RmdTemplateDiscoveryCompletedEvent());
}
else if (type.equals(ClientEvent.RmdShinyDocStarted))
{
RmdShinyDocInfo docInfo = event.getData();
eventBus_.fireEvent(new RmdShinyDocStartedEvent(docInfo));
}
else if (type.equals(ClientEvent.ShinyAppsDeploymentOutput))
{
CompileOutput output = event.getData();
eventBus_.fireEvent(new ShinyAppsDeploymentOutputEvent(output));
}
else if (type.equals(ClientEvent.ShinyAppsDeploymentCompleted))
{
String url = event.getData();