Search in sources :

Example 31 with Handler

use of org.rstudio.core.client.command.Handler in project rstudio by rstudio.

the class Workbench method onSetWorkingDirToProjectDir.

@Handler
void onSetWorkingDirToProjectDir() {
    FileSystemItem projectDir = session_.getSessionInfo().getActiveProjectDir();
    if (projectDir != null) {
        consoleDispatcher_.executeSetWd(projectDir, false);
        eventBus_.fireEvent(new DirectoryNavigateEvent(projectDir, true));
    }
}
Also used : FileSystemItem(org.rstudio.core.client.files.FileSystemItem) DirectoryNavigateEvent(org.rstudio.studio.client.workbench.views.files.events.DirectoryNavigateEvent) Handler(org.rstudio.core.client.command.Handler) VcsRefreshHandler(org.rstudio.studio.client.workbench.views.vcs.common.events.VcsRefreshHandler)

Example 32 with Handler

use of org.rstudio.core.client.command.Handler in project rstudio by rstudio.

the class PaneManager method onLayoutZoomCurrentPane.

@Handler
public void onLayoutZoomCurrentPane() {
    LogicalWindow activeWindow = getActiveLogicalWindow();
    if (activeWindow == null)
        return;
    toggleWindowZoom(activeWindow, null);
}
Also used : LogicalWindow(org.rstudio.core.client.layout.LogicalWindow) Handler(org.rstudio.core.client.command.Handler) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) SelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler)

Example 33 with Handler

use of org.rstudio.core.client.command.Handler in project rstudio by rstudio.

the class Shell method onConsoleClear.

@Handler
void onConsoleClear() {
    // clear output
    view_.clearOutput();
    // notify server
    server_.resetConsoleActions(new VoidServerRequestCallback());
    // if we don't bounce setFocus the menu retains focus
    Scheduler.get().scheduleDeferred(new ScheduledCommand() {

        public void execute() {
            view_.getInputEditorDisplay().setFocus(true);
        }
    });
}
Also used : ScheduledCommand(com.google.gwt.core.client.Scheduler.ScheduledCommand) VoidServerRequestCallback(org.rstudio.studio.client.server.VoidServerRequestCallback) Handler(org.rstudio.core.client.command.Handler)

Example 34 with Handler

use of org.rstudio.core.client.command.Handler in project rstudio by rstudio.

the class PaneManager method onActivateConsolePane.

@Handler
public void onActivateConsolePane() {
    // Ensure that the console window is activated
    LogicalWindow consoleWindow = getConsoleLogicalWindow();
    if (consoleWindow.getState().equals(WindowState.MINIMIZE)) {
        WindowStateChangeEvent event = new WindowStateChangeEvent(WindowState.NORMAL);
        consoleWindow.onWindowStateChange(event);
    }
    // created.
    if (consoleTabPanel_.isEmpty()) {
        consolePane_.focus();
    } else {
        LogicalWindow activeWindow = getActiveLogicalWindow();
        if (consoleWindow.equals(activeWindow)) {
            consoleTabPanel_.selectNextTab();
        } else {
            consoleTabPanel_.selectTab(consoleTabPanel_.getSelectedIndex());
        }
    }
}
Also used : LogicalWindow(org.rstudio.core.client.layout.LogicalWindow) WindowStateChangeEvent(org.rstudio.core.client.events.WindowStateChangeEvent) Handler(org.rstudio.core.client.command.Handler) ValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler) SelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler)

Example 35 with Handler

use of org.rstudio.core.client.command.Handler in project rstudio by rstudio.

the class WorkbenchScreen method onLayoutZoomHelp.

@Handler
void onLayoutZoomHelp() {
    paneManager_.zoomTab(Tab.Help);
    fireEventDelayed(new ActivateHelpEvent(), 200);
}
Also used : ActivateHelpEvent(org.rstudio.studio.client.workbench.views.help.events.ActivateHelpEvent) LastSourceDocClosedHandler(org.rstudio.studio.client.workbench.views.source.events.LastSourceDocClosedHandler) ChangeFontSizeHandler(org.rstudio.studio.client.application.events.ChangeFontSizeHandler) SelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler) ResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler) Handler(org.rstudio.core.client.command.Handler)

Aggregations

Handler (org.rstudio.core.client.command.Handler)55 ChangeFontSizeHandler (org.rstudio.studio.client.application.events.ChangeFontSizeHandler)20 EnsureHeightHandler (org.rstudio.core.client.events.EnsureHeightHandler)19 EnsureVisibleHandler (org.rstudio.core.client.events.EnsureVisibleHandler)19 FileChangeHandler (org.rstudio.studio.client.workbench.views.files.events.FileChangeHandler)18 HideMessageHandler (org.rstudio.studio.client.workbench.views.source.editors.text.status.StatusBar.HideMessageHandler)18 RecordNavigationPositionHandler (org.rstudio.studio.client.workbench.views.source.events.RecordNavigationPositionHandler)18 JsArrayString (com.google.gwt.core.client.JsArrayString)12 ProgressIndicator (org.rstudio.core.client.widget.ProgressIndicator)12 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)11 FileSystemItem (org.rstudio.core.client.files.FileSystemItem)10 VoidServerRequestCallback (org.rstudio.studio.client.server.VoidServerRequestCallback)9 CloseHandler (com.google.gwt.event.logical.shared.CloseHandler)8 SelectionHandler (com.google.gwt.event.logical.shared.SelectionHandler)8 Command (com.google.gwt.user.client.Command)8 ServerError (org.rstudio.studio.client.server.ServerError)7 InputEditorPosition (org.rstudio.studio.client.workbench.views.console.shell.editor.InputEditorPosition)7 NativePreviewHandler (com.google.gwt.user.client.Event.NativePreviewHandler)6 Breakpoint (org.rstudio.studio.client.common.debugging.model.Breakpoint)6 Position (org.rstudio.studio.client.workbench.views.source.editors.text.ace.Position)6