ConsolePrompt prompt = event.getData();
eventBus_.fireEvent(new ConsolePromptEvent(prompt));
}
else if (type.equals(ClientEvent.ShowEditor))
{
ShowEditorData data = event.getData();
eventBus_.fireEvent(new ShowEditorEvent(data));
}
else if (type.equals(ClientEvent.FileChanged))
{
FileChange fileChange = event.getData();
eventBus_.fireEvent(new FileChangeEvent(fileChange));
}
else if (type.equals(ClientEvent.WorkingDirChanged))
{
String path = event.getData();
eventBus_.fireEvent(new WorkingDirChangedEvent(path));
}
else if (type.equals(ClientEvent.ShowHelp))
{
String helpUrl = event.getData();
eventBus_.fireEvent(new ShowHelpEvent(helpUrl));
}
else if (type.equals(ClientEvent.ShowErrorMessage))
{
ErrorMessage errorMessage = event.getData();
eventBus_.fireEvent(new ShowErrorMessageEvent(errorMessage));
}
else if (type.equals(ClientEvent.ChooseFile))
{
boolean newFile = event.<Bool>getData().getValue();
eventBus_.fireEvent(new ChooseFileEvent(newFile));
}
else if (type.equals(ClientEvent.BrowseUrl))
{
BrowseUrlInfo urlInfo = event.getData();
eventBus_.fireEvent(new BrowseUrlEvent(urlInfo));
}
else if (type.equals(ClientEvent.PlotsStateChanged))
{
PlotsState plotsState = event.getData();
eventBus_.fireEvent(new PlotsChangedEvent(plotsState));
}
else if (type.equals(ClientEvent.ViewData))
{
DataView dataView = event.getData();
eventBus_.fireEvent(new ViewDataEvent(dataView));
}
else if (type.equals(ClientEvent.PackageStateChanged))
{
PackageState newState = event.getData();
eventBus_.fireEvent(new PackageStateChangedEvent(newState));
}
else if (type.equals(ClientEvent.PackageStatusChanged))
{
PackageStatus status = event.getData();
eventBus_.fireEvent(new PackageStatusChangedEvent(status));
}
else if (type.equals(ClientEvent.Locator))
{
eventBus_.fireEvent(new LocatorEvent());
}
else if (type.equals(ClientEvent.ConsoleResetHistory))
{
ConsoleResetHistory reset = event.getData();
eventBus_.fireEvent(new ConsoleResetHistoryEvent(reset));
}
else if (type.equals(ClientEvent.SessionSerialization))
{
SessionSerializationAction action = event.getData();
eventBus_.fireEvent(new SessionSerializationEvent(action));
}
else if (type.equals(ClientEvent.HistoryEntriesAdded))
{
RpcObjectList<HistoryEntry> entries = event.getData();
eventBus_.fireEvent(new HistoryEntriesAddedEvent(entries));
}
else if (type.equals(ClientEvent.QuotaStatus))
{
QuotaStatus quotaStatus = event.getData();
eventBus_.fireEvent(new QuotaStatusEvent(quotaStatus));
}
else if (type.equals(ClientEvent.FileEdit))
{
FileSystemItem file = event.getData();
eventBus_.fireEvent(new FileEditEvent(file));
}
else if (type.equals(ClientEvent.ShowContent))
{
ContentItem content = event.getData();
eventBus_.fireEvent(new ShowContentEvent(content));
}
else if (type.equals(ClientEvent.ShowData))
{
DataItem data = event.getData();
eventBus_.fireEvent(new ShowDataEvent(data));
}
else if (type.equals(ClientEvent.AbendWarning))
{
eventBus_.fireEvent(new SessionAbendWarningEvent());
}
else if (type.equals(ClientEvent.ShowWarningBar))
{
WarningBarMessage message = event.getData();
eventBus_.fireEvent(new ShowWarningBarEvent(message));
}
else if (type.equals(ClientEvent.OpenProjectError))
{
OpenProjectError error = event.getData();
eventBus_.fireEvent(new OpenProjectErrorEvent(error));
}
else if (type.equals(ClientEvent.VcsRefresh))
{
JsObject data = event.getData();
eventBus_.fireEvent(new VcsRefreshEvent(Reason.NA,
data.getInteger("delay")));
}
else if (type.equals(ClientEvent.AskPass))
{
AskPassEvent.Data data = event.getData();
eventBus_.fireEvent(new AskPassEvent(data));
}
else if (type.equals(ClientEvent.ConsoleProcessOutput))
{
ServerConsoleOutputEvent.Data data = event.getData();
eventBus_.fireEvent(new ServerConsoleOutputEvent(data.getHandle(),
data.getOutput(),
data.isError()));
}
else if (type.equals(ClientEvent.ConsoleProcessPrompt))
{
ServerConsolePromptEvent.Data data = event.getData();
eventBus_.fireEvent(new ServerConsolePromptEvent(data.getHandle(),
data.getPrompt()));
}
else if (type.equals(ClientEvent.ConsoleProcessCreated))
{
ConsoleProcessCreatedEvent.Data data = event.getData();
eventBus_.fireEvent(new ConsoleProcessCreatedEvent(data));
}
else if (type.equals(ClientEvent.ConsoleProcessExit))
{
ServerProcessExitEvent.Data data = event.getData();
eventBus_.fireEvent(new ServerProcessExitEvent(data.getHandle(),
data.getExitCode()));
}
else if (type.equals(ClientEvent.HTMLPreviewStartedEvent))
{
HTMLPreviewStartedEvent.Data data = event.getData();
eventBus_.fireEvent(new HTMLPreviewStartedEvent(data));
}
else if (type.equals(ClientEvent.HTMLPreviewOutputEvent))
{
String output = event.getData();
eventBus_.fireEvent(new HTMLPreviewOutputEvent(output));
}
else if (type.equals(ClientEvent.HTMLPreviewCompletedEvent))
{
HTMLPreviewResult result = event.getData();
eventBus_.fireEvent(new HTMLPreviewCompletedEvent(result));
}
else if (type.equals(ClientEvent.CompilePdfStartedEvent))
{
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));