Lines 281-287
Link Here
|
281 |
* @return the currently selected text |
281 |
* @return the currently selected text |
282 |
*/ |
282 |
*/ |
283 |
private String extractSelectedText() { |
283 |
private String extractSelectedText() { |
284 |
if(fSelectionStartLine<0 || fSelectionStartCoumn<0 || fSelectionEndColumn<0 || fSelectionSnapshot==null) |
284 |
if(fSelectionStartLine<0 || fSelectionStartCoumn<0 || fSelectionSnapshot==null) |
285 |
return ""; //$NON-NLS-1$ |
285 |
return ""; //$NON-NLS-1$ |
286 |
StringBuffer buffer=new StringBuffer(); |
286 |
StringBuffer buffer=new StringBuffer(); |
287 |
for (int line = fSelectionStartLine; line <= fSeletionEndLine; line++) { |
287 |
for (int line = fSelectionStartLine; line <= fSeletionEndLine; line++) { |
Lines 289-295
Link Here
|
289 |
char[] chars=fSelectionSnapshot.getChars(line); |
289 |
char[] chars=fSelectionSnapshot.getChars(line); |
290 |
if(chars!=null) { |
290 |
if(chars!=null) { |
291 |
text=new String(chars); |
291 |
text=new String(chars); |
292 |
if(line==fSeletionEndLine) |
292 |
if(line==fSeletionEndLine && fSelectionEndColumn >= 0) |
293 |
text=text.substring(0, Math.min(fSelectionEndColumn+1,text.length())); |
293 |
text=text.substring(0, Math.min(fSelectionEndColumn+1,text.length())); |
294 |
if(line==fSelectionStartLine) |
294 |
if(line==fSelectionStartLine) |
295 |
text=text.substring(Math.min(fSelectionStartCoumn,text.length())); |
295 |
text=text.substring(Math.min(fSelectionStartCoumn,text.length())); |