Search in sources :

Example 1 with VcsRefreshHandler

use of org.rstudio.studio.client.workbench.views.vcs.common.events.VcsRefreshHandler in project rstudio by rstudio.

the class Workbench method onWorkbenchLoaded.

public void onWorkbenchLoaded(WorkbenchLoadedEvent event) {
    server_.initializeForMainWorkbench();
    FileSystemItem defaultDialogDir = session_.getSessionInfo().getActiveProjectDir();
    if (defaultDialogDir != null)
        workbenchContext_.setDefaultFileDialogDir(defaultDialogDir);
    // check for init messages
    checkForInitMessages();
    if (Desktop.isDesktop() && session_.getSessionInfo().getVcsName().equals(VCSConstants.GIT_ID)) {
        pGitState_.get().addVcsRefreshHandler(new VcsRefreshHandler() {

            @Override
            public void onVcsRefresh(VcsRefreshEvent event) {
                String title = workbenchContext_.createWindowTitle();
                if (title != null)
                    Desktop.getFrame().setWindowTitle(title);
            }
        });
    }
}
Also used : FileSystemItem(org.rstudio.core.client.files.FileSystemItem) VcsRefreshEvent(org.rstudio.studio.client.workbench.views.vcs.common.events.VcsRefreshEvent) VcsRefreshHandler(org.rstudio.studio.client.workbench.views.vcs.common.events.VcsRefreshHandler)

Aggregations

FileSystemItem (org.rstudio.core.client.files.FileSystemItem)1 VcsRefreshEvent (org.rstudio.studio.client.workbench.views.vcs.common.events.VcsRefreshEvent)1 VcsRefreshHandler (org.rstudio.studio.client.workbench.views.vcs.common.events.VcsRefreshHandler)1