File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
plugins/org.eclipse.dltk.javascript.ui/src/org/eclipse/dltk/javascript/scriptdoc Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -646,20 +646,12 @@ private StringBuffer getLeadingWhitespace(int offset) {
646
646
ITypedRegion partition = TextUtilities .getPartition (fDocument ,
647
647
IJavaScriptPartitions .JS_PARTITIONING , lineOffset , true );
648
648
String type = partition .getType ();
649
- while ((type .equals (IJavaScriptPartitions .JS_DOC ) || type
649
+ if ((type .equals (IJavaScriptPartitions .JS_DOC ) || type
650
650
.equals (IJavaScriptPartitions .JS_MULTI_LINE_COMMENT ))
651
651
&& lineOffset > 0 ) {
652
- IRegion tmpLine = fDocument
653
- .getLineInformationOfOffset (lineOffset - 1 );
654
- partition = TextUtilities .getPartition (fDocument ,
655
- IJavaScriptPartitions .JS_PARTITIONING ,
656
- tmpLine .getOffset (), false );
657
- type = partition .getType ();
658
- if (type .equals (IJavaScriptPartitions .JS_DOC )
659
- || type .equals (IJavaScriptPartitions .JS_MULTI_LINE_COMMENT )) {
660
- line = tmpLine ;
661
- lineOffset = line .getOffset ();
662
- }
652
+ line = fDocument .getLineInformationOfOffset (partition
653
+ .getOffset ());
654
+ lineOffset = line .getOffset ();
663
655
}
664
656
int nonWS = fScanner .findNonWhitespaceForwardInAnyPartition (
665
657
lineOffset , lineOffset + line .getLength ());
You can’t perform that action at this time.
0 commit comments