Skip to content

Commit

Permalink
Rename findWord to getWord
Browse files Browse the repository at this point in the history
The rename is necessary because methods starting with `find` should
return an `Option` and later refactorings are built upon this change.
  • Loading branch information
kiritsuku authored and François Garillot committed Sep 25, 2014
1 parent 23fde58 commit 5b373c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
import org.eclipse.jface.text.IRegion;

public interface IScalaWordFinder {
public IRegion findWord(IDocument document, int offset);
public IRegion getWord(IDocument document, int offset);
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public privileged aspect HoversAspect {
return proceed(th, textViewer, offset);

IScalaCompilationUnit scu = (IScalaCompilationUnit)codeAssist;
return scu.getScalaWordFinder().findWord(textViewer.getDocument(), offset);
return scu.getScalaWordFinder().getWord(textViewer.getDocument(), offset);
}

void around(JavaElementLabelComposer jelc, IJavaElement element, long flags) :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ object ScalaWordFinder extends IScalaWordFinder {
override def length = buf.getLength
}

override def getWord(document: IDocument, offset: Int): IRegion =
findWord(document, offset)

def findWord(document : IDocument, offset : Int) : IRegion =
findWord(docToSeq(document), offset)

Expand Down

0 comments on commit 5b373c4

Please sign in to comment.