Changeset 10983
- Timestamp:
- 02/04/06 21:15:33 (18 years ago)
- Location:
- trunk/j/src/org/armedbear/j
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/CppTagger.java
r10977 r10983 70 70 if (pos.lookingAt("//")) 71 71 { 72 LocalTag tag = checkForExplicitTag(pos); 73 if (tag instanceof CppTag) 74 tags.add(tag); 72 75 skipSingleLineComment(pos); 73 76 continue; -
trunk/j/src/org/armedbear/j/JavaTagger.java
r10982 r10983 3 3 * 4 4 * Copyright (C) 1998-2006 Peter Graves 5 * $Id: JavaTagger.java,v 1. 7 2006-02-04 21:00:26piso Exp $5 * $Id: JavaTagger.java,v 1.8 2006-02-04 21:14:30 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 85 85 if (pos.lookingAt("//")) 86 86 { 87 LocalTag tag = checkForExplicitTag(pos); 88 if (tag instanceof JavaTag) 89 tags.add(tag); 87 90 skipSingleLineComment(pos); 88 91 continue; … … 364 367 protected final void skipSingleLineComment(Position pos) 365 368 { 366 checkForExplicitTag(pos);367 369 Line next = pos.getNextLine(); 368 370 if (next != null) … … 372 374 } 373 375 374 private final void checkForExplicitTag(Position pos) 375 { 376 if (tags == null) 377 return; // Only supported for Java and JavaScript for now. 376 protected final LocalTag checkForExplicitTag(Position pos) 377 { 378 // Only supported for Java, JavaScript and C++ for now. 379 final int modeId = buffer.getModeId(); 380 if (modeId != JAVA_MODE && modeId != JAVASCRIPT_MODE && modeId != CPP_MODE) 381 return null; 378 382 final String explicitTag = 379 383 Editor.preferences().getStringProperty(Property.EXPLICIT_TAG); … … 419 423 pos.setOffset(0); 420 424 pos.skipWhitespace(); 421 tags.add(new JavaTag(tag, pos, TAG_EXPLICIT, 0, currentClass)); 422 } 423 } 425 if (buffer.getModeId() == JAVA_MODE) 426 return new JavaTag(tag, pos, TAG_EXPLICIT, 0, currentClass); 427 else if (buffer.getModeId() == CPP_MODE) 428 return new CppTag(tag, pos, TAG_EXPLICIT); 429 } 430 } 431 return null; 424 432 } 425 433
Note: See TracChangeset
for help on using the changeset viewer.