Search in sources :

Example 6 with FilePosition

use of org.rstudio.core.client.FilePosition in project rstudio by rstudio.

the class Synctex method goToSourceLocation.

private void goToSourceLocation(SourceLocation location) {
    FilePosition position = FilePosition.create(location.getLine(), Math.min(1, location.getColumn()));
    fileTypeRegistry_.editFile(FileSystemItem.createFile(location.getFile()), position);
}
Also used : FilePosition(org.rstudio.core.client.FilePosition)

Example 7 with FilePosition

use of org.rstudio.core.client.FilePosition in project rstudio by rstudio.

the class DebugCommander method highlightDebugPosition.

// Private methods ---------------------------------------------------------
private void highlightDebugPosition(LineData lineData, boolean finished) {
    FileSystemItem sourceFile = FileSystemItem.createFile(debugFile_);
    DebugFilePosition position = DebugFilePosition.create(lineData.getLineNumber(), lineData.getEndLineNumber(), lineData.getCharacterNumber(), lineData.getEndCharacterNumber());
    eventBus_.fireEvent(new OpenSourceFileEvent(sourceFile, (FilePosition) position.cast(), FileTypeRegistry.R, finished ? NavigationMethods.DEBUG_END : NavigationMethods.DEBUG_STEP));
}
Also used : FileSystemItem(org.rstudio.core.client.files.FileSystemItem) OpenSourceFileEvent(org.rstudio.studio.client.common.filetypes.events.OpenSourceFileEvent) FilePosition(org.rstudio.core.client.FilePosition) DebugFilePosition(org.rstudio.core.client.DebugFilePosition) DebugFilePosition(org.rstudio.core.client.DebugFilePosition)

Aggregations

FilePosition (org.rstudio.core.client.FilePosition)7 FileSystemItem (org.rstudio.core.client.files.FileSystemItem)4 DebugFilePosition (org.rstudio.core.client.DebugFilePosition)2 OpenSourceFileEvent (org.rstudio.studio.client.common.filetypes.events.OpenSourceFileEvent)2 JsArrayString (com.google.gwt.core.client.JsArrayString)1 CloseHandler (com.google.gwt.event.logical.shared.CloseHandler)1 CodeNavigationTarget (org.rstudio.core.client.CodeNavigationTarget)1 Handler (org.rstudio.core.client.command.Handler)1 EnsureHeightHandler (org.rstudio.core.client.events.EnsureHeightHandler)1 EnsureVisibleHandler (org.rstudio.core.client.events.EnsureVisibleHandler)1 SelectionCommitHandler (org.rstudio.core.client.events.SelectionCommitHandler)1 TextFileType (org.rstudio.studio.client.common.filetypes.TextFileType)1 OpenPresentationSourceFileEvent (org.rstudio.studio.client.common.filetypes.events.OpenPresentationSourceFileEvent)1 CodeBrowserFinishedEvent (org.rstudio.studio.client.workbench.views.source.events.CodeBrowserFinishedEvent)1 CodeBrowserHighlightEvent (org.rstudio.studio.client.workbench.views.source.events.CodeBrowserHighlightEvent)1 CodeBrowserNavigationEvent (org.rstudio.studio.client.workbench.views.source.events.CodeBrowserNavigationEvent)1