Skip to content

Commit

Permalink
show help for code nav symbols that aren't found
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Sep 21, 2011
1 parent 9bed933 commit f57370e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/cpp/session/modules/SessionCodeSearch.cpp
Expand Up @@ -53,10 +53,6 @@

// TODO: don't index code which is commented out

// TODO: make sure the failure code branches are hit as expected

// TODO: consider doing a help navigation if not found?

// TODO: hookup back (stack/jump/gotofile/enable/disable)

using namespace core ;
Expand Down
Expand Up @@ -1441,6 +1441,16 @@ else if (loc.getFile() != null)
fileTypeRegistry_.editFile(loc.getFile(),
loc.getPosition());
}

// otherwise try to show help
else
{
String function = loc.getFunctionName();
server_.getHelpAtCursor(
function,
function.length(),
new SimpleRequestCallback<Void>("Help"));
}
}
}

Expand Down
Expand Up @@ -14,6 +14,7 @@

import com.google.gwt.core.client.JsArrayString;
import org.rstudio.core.client.js.JsObject;
import org.rstudio.studio.client.common.codetools.CodeToolsServerOperations;
import org.rstudio.studio.client.server.ServerRequestCallback;
import org.rstudio.studio.client.server.Void;
import org.rstudio.studio.client.workbench.codesearch.model.CodeSearchServerOperations;
Expand All @@ -29,6 +30,7 @@
* whether the user has actually hit save.
*/
public interface SourceServerOperations extends FilesServerOperations,
CodeToolsServerOperations,
CodeSearchServerOperations

{
Expand Down

0 comments on commit f57370e

Please sign in to comment.