Search in sources :

Example 1 with SwitchToProjectEvent

use of org.rstudio.studio.client.projects.events.SwitchToProjectEvent in project rstudio by rstudio.

the class ProjectPreferencesPane method promptToRestart.

protected void promptToRestart() {
    globalDisplay_.showYesNoMessage(MessageDialog.QUESTION, "Confirm Restart RStudio", "You need to restart RStudio in order for this change to take " + "effect. Do you want to do this now?", new Operation() {

        @Override
        public void execute() {
            forceClosed(new Command() {

                @Override
                public void execute() {
                    SwitchToProjectEvent event = new SwitchToProjectEvent(session_.getSessionInfo().getActiveProjectFile());
                    eventBus_.fireEvent(event);
                }
            });
        }
    }, true);
}
Also used : Command(com.google.gwt.user.client.Command) SwitchToProjectEvent(org.rstudio.studio.client.projects.events.SwitchToProjectEvent) Operation(org.rstudio.core.client.widget.Operation)

Aggregations

Command (com.google.gwt.user.client.Command)1 Operation (org.rstudio.core.client.widget.Operation)1 SwitchToProjectEvent (org.rstudio.studio.client.projects.events.SwitchToProjectEvent)1