Skip to content

Commit

Permalink
pre-PR whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gtritchie committed Sep 25, 2020
1 parent 7cce206 commit ec305e4
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 72 deletions.
52 changes: 26 additions & 26 deletions src/gwt/src/org/rstudio/studio/client/RStudio.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void onModuleLoad()
maybeSetWindowName("rstudio-" + StringUtil.makeRandomId(16));
maybeDelayLoadApplication(this);
}

private Command showProgress(Widget progressAction)
{
final Label background = new Label();
Expand Down Expand Up @@ -173,13 +173,13 @@ private Command showProgress(Widget progressAction)
statusPanel.add(progressAction);
statusPanel.setCellHorizontalAlignment(progressAction, VerticalPanel.ALIGN_CENTER);
}

if (ApplicationAction.isLauncherSession())
{
sessionStatus_ = new LauncherSessionStatus();
sessionStatus_.setVisible(false);
statusPanel.add(sessionStatus_);

// Wait a bit to keep things uncluttered for typical load,
// then show message so they know things are happening, including
// a link back to the home page
Expand Down Expand Up @@ -208,7 +208,7 @@ public void run()
}

rootPanel.add(statusPanel);

return () ->
{
try
Expand All @@ -227,12 +227,12 @@ public void run()
}
};
}

private static final native void maybeSetWindowName(String name)
/*-{
$wnd.name = $wnd.name || name;
}-*/;

private static final native void maybeDelayLoadApplication(RStudio rstudio)
/*-{
if ($wnd.qt)
Expand All @@ -251,17 +251,17 @@ private static final native void maybeDelayLoadApplication(RStudio rstudio)
$wnd.rstudioDelayLoadApplication = $entry(function() {
rstudio.@org.rstudio.studio.client.RStudio::delayLoadApplication()();
});
// set a timeout and attempt load just in case something goes wrong with
// Qt initialization (we don't want to just leave the user with a blank
// window)
setTimeout(function() {
if (typeof $wnd.rstudioDelayLoadApplication == "function") {
// let the user know things might go wrong
var msg = "WARNING: RStudio launched before desktop initialization known to be complete!";
@org.rstudio.core.client.Debug::log(Ljava/lang/String;)(msg);
// begin load
$wnd.rstudioDelayLoadApplication();
$wnd.rstudioDelayLoadApplication = null;
Expand All @@ -274,12 +274,12 @@ private static final native void maybeDelayLoadApplication(RStudio rstudio)
// server and satellites can load as usual
rstudio.@org.rstudio.studio.client.RStudio::delayLoadApplication()();
}
}-*/;

private void delayLoadApplication()
{
// if we are loading the main window, and we're not a launcher session,
// if we are loading the main window, and we're not a launcher session,
// add buttons for bailing out
String view = getSatelliteView();
if (StringUtil.isNullOrEmpty(view) && !ApplicationAction.isLauncherSession())
Expand Down Expand Up @@ -310,18 +310,18 @@ public void run()

// ensure Ace is loaded up front
queue.addCommand(continuation -> AceEditor.load(continuation));

// load the requested page
queue.addCommand(continuation -> onDelayLoadApplication());

GWT.runAsync(new RunAsyncCallback()
{
@Override
public void onSuccess()
{
queue.run();
}

@Override
public void onFailure(Throwable reason)
{
Expand All @@ -330,7 +330,7 @@ public void onFailure(Throwable reason)
}
});
}

private void onDelayLoadApplication()
{
ensureStylesInjected();
Expand All @@ -351,28 +351,28 @@ else if (HTMLPreviewApplication.NAME.equals(view))
else if (view != null && view.startsWith(
ShinyApplicationSatellite.NAME_PREFIX))
{
ShinyApplicationSatellite satellite =
ShinyApplicationSatellite satellite =
new ShinyApplicationSatellite(view);
satellite.go(RootLayoutPanel.get(), dismissProgressAnimation_);
}
else if (RmdOutputSatellite.NAME.equals(view))
{
RStudioGinjector.INSTANCE.getRmdOutputSatellite().go(
RootLayoutPanel.get(),
RootLayoutPanel.get(),
dismissProgressAnimation_);
}
else if (view != null &&
else if (view != null &&
view.startsWith(SourceSatellite.NAME_PREFIX))
{
SourceSatellite satellite = new SourceSatellite(view);
satellite.go(RootLayoutPanel.get(),
satellite.go(RootLayoutPanel.get(),
dismissProgressAnimation_);
}
else if (view != null &&
else if (view != null &&
view.startsWith(ChunkSatellite.NAME_PREFIX))
{
ChunkSatellite satellite = new ChunkSatellite(view);
satellite.go(RootLayoutPanel.get(),
satellite.go(RootLayoutPanel.get(),
dismissProgressAnimation_);
}
else if (PlumberAPISatellite.NAME.equals(view))
Expand Down Expand Up @@ -406,7 +406,7 @@ public void onError(ServerError error)
connectionStatusCallback);
}
}

private void ensureStylesInjected()
{
ThemeResources.INSTANCE.themeStyles().ensureInjected();
Expand All @@ -422,7 +422,7 @@ private void ensureStylesInjected()
SourceMarkerListResources.INSTANCE.styles().ensureInjected();
BuildPaneResources.INSTANCE.styles().ensureInjected();
PanmirrorToolbarResources.INSTANCE.styles().ensureInjected();

ProgressDialog.ensureStylesInjected();
SlideLabel.ensureStylesInjected();
ThemedButton.ensureStylesInjected();
Expand Down Expand Up @@ -473,11 +473,11 @@ private void ensureStylesInjected()
SecondaryReposWidget.ensureStylesInjected();
SecondaryReposDialog.ensureStylesInjected();
VisualModeDialogsResources.ensureStylesInjected();

StyleInjector.inject(
"button::-moz-focus-inner {border:0}");
}

/**
* Make an element visually hidden (aka screen reader only). Don't use our shared
* function A11y.setVisuallyHidden during boot screen because it relies on styles
Expand Down
Loading

0 comments on commit ec305e4

Please sign in to comment.