Summary: | SelectionEngine to be made API? | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Claude Knaus <Claude_Knaus> |
Component: | Core | Assignee: | David Audel <david_audel> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 2.1 M4 | ||
Hardware: | PC | ||
OS: | All | ||
Whiteboard: |
Description
Claude Knaus
2002-11-04 06:57:12 EST
Not currently. Could be promoted to CharOperation... David, what do you think ? checkSelection() can not be easily promoted to CharOperation because this method change the value of several fields of SelectionEngine. - int actualSelectionStart - int actualSelectionEnd - char[] selectedIdentifier - char[] qualifiedSelection Claude, you can easily create your own method. Use 'org.eclipse.jdt.core.ToolFactory#createScanner()' and copy the algorithm of 'SelectionEngine#checkSelection()' (replace 'Scanner' by 'IScanner' and 'scanner.startPosition' by 'scanner.getCurrentTokenStartPosition()' and 'scanner.currentPosition' by 'scanner.getCurrentTokenEndPosition() + 1'). Well, I rather stick to the double click strategy for now. I don't feel like duplicating that much code. checkSelection can not be promoted to API. Closing. |