Lines 47-52
Link Here
|
47 |
import javax.swing.text.BadLocationException; |
47 |
import javax.swing.text.BadLocationException; |
48 |
import javax.swing.text.Document; |
48 |
import javax.swing.text.Document; |
49 |
import org.netbeans.api.lexer.TokenSequence; |
49 |
import org.netbeans.api.lexer.TokenSequence; |
|
|
50 |
import org.netbeans.modules.php.api.util.StringUtils; |
50 |
import org.netbeans.modules.php.editor.lexer.LexUtilities; |
51 |
import org.netbeans.modules.php.editor.lexer.LexUtilities; |
51 |
import org.netbeans.modules.php.editor.lexer.PHPTokenId; |
52 |
import org.netbeans.modules.php.editor.lexer.PHPTokenId; |
52 |
import org.netbeans.modules.php.editor.parser.PHPDocCommentParser; |
53 |
import org.netbeans.modules.php.editor.parser.PHPDocCommentParser; |
Lines 272-283
Link Here
|
272 |
List<PHPDocTypeNode> types = docTypeTag.getTypes(); |
273 |
List<PHPDocTypeNode> types = docTypeTag.getTypes(); |
273 |
PHPDocTypeNode lastType = null; |
274 |
PHPDocTypeNode lastType = null; |
274 |
for (PHPDocTypeNode type : types) { |
275 |
for (PHPDocTypeNode type : types) { |
|
|
276 |
String value = type.getValue(); |
277 |
if (StringUtils.isEmpty(value)) { |
278 |
continue; |
279 |
} |
275 |
if (lastType == null || lastType.getEndOffset() < type.getEndOffset()) { |
280 |
if (lastType == null || lastType.getEndOffset() < type.getEndOffset()) { |
276 |
lastType = type; |
281 |
lastType = type; |
277 |
} |
282 |
} |
278 |
} |
283 |
} |
279 |
if (lastType != null) { |
284 |
if (lastType != null) { |
280 |
currentOffsetInComment = lastType.getEndOffset(); |
285 |
int endOffset = lastType.getEndOffset(); |
|
|
286 |
if (currentOffsetInComment < endOffset) { |
287 |
currentOffsetInComment = endOffset; |
288 |
} |
281 |
} |
289 |
} |
282 |
|
290 |
|
283 |
if (docTypeTag instanceof PHPDocMethodTag) { |
291 |
if (docTypeTag instanceof PHPDocMethodTag) { |
Lines 291-297
Link Here
|
291 |
} |
299 |
} |
292 |
} |
300 |
} |
293 |
if (lastParam != null) { |
301 |
if (lastParam != null) { |
294 |
currentOffsetInComment = lastParam.getEndOffset(); |
302 |
int endOffset = lastParam.getEndOffset(); |
|
|
303 |
if (currentOffsetInComment < endOffset) { |
304 |
currentOffsetInComment = endOffset; |
305 |
} |
295 |
} else { |
306 |
} else { |
296 |
// ignore method name |
307 |
// ignore method name |
297 |
PHPDocNode methodName = methodTag.getMethodName(); |
308 |
PHPDocNode methodName = methodTag.getMethodName(); |
Lines 301-307
Link Here
|
301 |
currentOffsetInComment, |
312 |
currentOffsetInComment, |
302 |
LetterType.MethodName |
313 |
LetterType.MethodName |
303 |
); |
314 |
); |
304 |
if (data.first().equals(methodName.getValue())) { |
315 |
if (data != null && data.first().equals(methodName.getValue())) { |
305 |
currentOffsetInComment = getCurrentOffsetInComment(data); |
316 |
currentOffsetInComment = getCurrentOffsetInComment(data); |
306 |
} |
317 |
} |
307 |
} |
318 |
} |