Source:
<code>public void onActivate() { activeProfilerEditingTarger_ = this; Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { commands_.gotoProfileSource().setEnabled(hasValidPath_); } }); if (!htmlPathInitialized_) { htmlPathInitialized_ = true; htmlPath_ = getContents().getHtmlPath(); htmlLocalPath_ = getContents().getHtmlLocalPath(); isUserSaved_ = getContents().isUserSaved(); if (htmlPath_ == null) { presenter_.buildHtmlPath(new OperationWithInput<ProfileOperationResponse>() { @Override public void execute(ProfileOperationResponse response) { htmlPath_ = response.getHtmlPath(); htmlLocalPath_ = response.getHtmlLocalPath(); persistDocumentProperty("htmlPath", htmlPath_); persistDocumentProperty("htmlLocalPath", htmlLocalPath_); view_.showProfilePage(htmlPath_); pSourceWindowManager_.get().maximizeSourcePaneIfNecessary(); } }, new Operation() { @Override public void execute() { server_.clearProfile(getPath(), new ServerRequestCallback<JavaScriptObject>() { @Override public void onResponseReceived(JavaScriptObject response) { commands_.closeSourceDoc().execute(); } @Override public void onError(ServerError error) { <START> Debug.logError(error); <END> } }); } }, getPath()); } else { view_.showProfilePage(htmlPath_); Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { pSourceWindowManager_.get().maximizeSourcePaneIfNecessary(); } }); } } if (commandHandlerReg_ != null) { Debug.log("Warning: onActivate called twice without intervening onDeactivate"); commandHandlerReg_.removeHandler(); commandHandlerReg_ = null; } commandHandlerReg_ = commandBinder.bind(commands_, this); }</code><technical_language>close source doc if clear profile? (i.e. a problem server get UI stuck?)</technical_language>

Target:
public void onActivate() { activeProfilerEditingTarger_ = this; Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { commands_.gotoProfileSource().setEnabled(hasValidPath_); } }); if (!htmlPathInitialized_) { htmlPathInitialized_ = true; htmlPath_ = getContents().getHtmlPath(); htmlLocalPath_ = getContents().getHtmlLocalPath(); isUserSaved_ = getContents().isUserSaved(); if (htmlPath_ == null) { presenter_.buildHtmlPath(new OperationWithInput<ProfileOperationResponse>() { @Override public void execute(ProfileOperationResponse response) { htmlPath_ = response.getHtmlPath(); htmlLocalPath_ = response.getHtmlLocalPath(); persistDocumentProperty("htmlPath", htmlPath_); persistDocumentProperty("htmlLocalPath", htmlLocalPath_); view_.showProfilePage(htmlPath_); pSourceWindowManager_.get().maximizeSourcePaneIfNecessary(); } }, new Operation() { @Override public void execute() { server_.clearProfile(getPath(), new ServerRequestCallback<JavaScriptObject>() { @Override public void onResponseReceived(JavaScriptObject response) { commands_.closeSourceDoc().execute(); } @Override public void onError(ServerError error) { Debug.logError(error); commands_.closeSourceDoc().execute(); } }); } }, getPath()); } else { view_.showProfilePage(htmlPath_); Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { pSourceWindowManager_.get().maximizeSourcePaneIfNecessary(); } }); } } if (commandHandlerReg_ != null) { Debug.log("Warning: onActivate called twice without intervening onDeactivate"); commandHandlerReg_.removeHandler(); commandHandlerReg_ = null; } commandHandlerReg_ = commandBinder.bind(commands_, this); }