Changeset 17
- Timestamp:
- 10/01/02 19:21:28 (20 years ago)
- Location:
- trunk/j/src/org/armedbear/j
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/AbstractMode.java
r2 r17 3 3 * 4 4 * Copyright (C) 1998-2002 Peter Graves 5 * $Id: AbstractMode.java,v 1. 1.1.1 2002-09-24 16:08:19piso Exp $5 * $Id: AbstractMode.java,v 1.2 2002-10-01 19:21:28 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 201 201 } 202 202 203 /** 204 * {@inheritDoc} 205 * In order for this to populate a menu, the text of the menu must be 206 * one of the following:<br> 207 * <ul> 208 * <li>File 209 * <li>Edit 210 * <li>View 211 * <li>Search 212 * <li>Go 213 * <li>Help 214 * </ul> 215 * This does not take into account whether or not <code>menu<code> 216 * currently has items on it, so repeated calls will result in duplicate 217 * menu items. 218 * 219 * @param editor {@inheritDoc} 220 * @param menu {@inheritDoc} 221 */ 203 222 public void populateMenu(Editor editor, Menu menu) 204 223 { … … 344 363 } 345 364 365 /** 366 * {@inheritDoc} 367 * This creates a menu with the given items:<br> 368 * <li>Cut 369 * <li>Copy 370 * <li>Paste 371 * <li>--separator-- 372 * <li>List occurances 373 * <li>Find tag (if applicable) 374 * <li>--separator-- 375 * <li>Properties (if applicable) 376 * <ul> 377 * The names and actions are sensitive to whether or not text is currently 378 * selected, the buffer is taggable, if the buffer has properties, and 379 * whether or not there is a search in progress. 380 * 381 * @param editor {@inheritDoc} 382 * @return {@inheritDoc} 383 */ 346 384 public JPopupMenu getContextMenu(Editor editor) 347 385 { … … 419 457 } 420 458 459 /** 460 * {@inheritDoc} 461 * This returns the default toolbar from <code>frame</code>. 462 * 463 * @param frame {@inheritDoc} 464 * @return {@inheritDoc} 465 */ 421 466 public ToolBar getToolBar(Frame frame) 422 467 { … … 432 477 } 433 478 479 /** 480 * {@inheritDoc} 481 * The default is <code>null</code>. 482 * 483 * @param buffer {@inheritDoc} 484 * @return {@inheritDoc} 485 */ 434 486 public Tagger getTagger(SystemBuffer buffer) 435 487 { … … 437 489 } 438 490 491 /** 492 * {@inheritDoc} 493 * The default is <code>false</code>. 494 * 495 * @return {@inheritDoc} 496 */ 439 497 public boolean isTaggable() 440 498 { … … 442 500 } 443 501 502 /** 503 * {@inheritDoc} 504 * The default is <code>false</code>. 505 * 506 * @return {@inheritDoc} 507 */ 444 508 public boolean hasQualifiedNames() 445 509 { … … 447 511 } 448 512 513 /** 514 * {@inheritDoc} 515 * The default is <code>true</code> if <code>s</code> contains either 516 * a period '.' or a double colon "::". 517 * 518 * @param s {@inheritDoc} 519 * @return {@inheritDoc} 520 */ 449 521 public boolean isQualifiedName(String s) 450 522 { … … 452 524 } 453 525 526 /** 527 * {@inheritDoc} 528 * The default is <code>false</code>. 529 * 530 * @return {@inheritDoc} 531 */ 454 532 public boolean canIndent() 455 533 { … … 457 535 } 458 536 537 /** 538 * {@inheritDoc} 539 * The default is <code>false</code>. 540 * 541 * @return {@inheritDoc} 542 */ 459 543 public boolean canIndentPaste() 460 544 { … … 462 546 } 463 547 548 /** 549 * {@inheritDoc} 550 * The default is 0. 551 * 552 * @param line {@inheritDoc} 553 * @param buffer {@inheritDoc} 554 * @return {@inheritDoc} 555 */ 464 556 public int getCorrectIndentation(Line line, Buffer buffer) 465 557 { … … 467 559 } 468 560 561 /** 562 * {@inheritDoc} 563 * The default is to return an instance of 564 * {@link DefaultSyntaxIterator DefaultSyntaxIterator}. 565 * 566 * @param pos {@inheritDoc} 567 * @return {@inheritDoc} 568 */ 469 569 public SyntaxIterator getSyntaxIterator(Position pos) 470 570 { … … 472 572 } 473 573 574 /** 575 * {@inheritDoc} 576 * The default is <code>null</code>. 577 * 578 * @return {@inheritDoc} 579 */ 474 580 public String getCommentStart() 475 581 { … … 477 583 } 478 584 585 /** 586 * {@inheritDoc} 587 * The default is <code>null</code>. 588 * 589 * @return {@inheritDoc} 590 */ 479 591 public String getCommentEnd() 480 592 { … … 602 714 } 603 715 716 /** 717 * Sets the given property name to the given property value. The property 718 * can then be accessed by calling 719 * {@link getStringProperty(Property) getStringProperty}. 720 * 721 * @param property the property to set. 722 * @param value the value to set it to. 723 */ 604 724 public void setProperty(Property property, String value) 605 725 { … … 609 729 } 610 730 731 /** 732 * Sets the given property name to the given property value. The property 733 * can then be accessed by calling 734 * {@link getBooleanProperty(Property) getBooleanProperty}. 735 * 736 * @param property the property to set. 737 * @param value the value to set it to. 738 */ 611 739 public void setProperty(Property property, boolean value) 612 740 { … … 616 744 } 617 745 746 /** 747 * Sets the given property name to the given property value. The property 748 * can then be accessed by calling 749 * {@link getIntegerProperty(Property) getIntegerProperty}. 750 * 751 * @param property the property to set. 752 * @param value the value to set it to. 753 */ 618 754 public void setProperty(Property property, int value) 619 755 { … … 623 759 } 624 760 761 /** 762 * Returns the default value for the given <code>Property</code>. 763 * 764 * @param property the <code>Property</code> to get the default value for. 765 * @return the default value. 766 */ 625 767 protected Object getDefaultValue(Property property) 626 768 { … … 647 789 } 648 790 791 /** 792 * {@inheritDoc} 793 * The default is the result of Character.isJavaIdentifierStart(char). 794 * 795 * @return {@inheritDoc} 796 */ 649 797 public boolean isIdentifierStart(char c) 650 798 { … … 652 800 } 653 801 802 /** 803 * {@inheritDoc} 804 * The default is the result of Character.isJavaIdentifierPart(char). 805 * 806 * @return {@inheritDoc} 807 */ 654 808 public boolean isIdentifierPart(char c) 655 809 { … … 657 811 } 658 812 813 /** 814 * {@inheritDoc} 815 * The default implementation considers both single and double quotes 816 * (which is wrong for Lisp) and only looks at the current line (which 817 * is wrong for C and C++). 818 * 819 * @param buffer {@inheritDoc} 820 * @param pos {@inheritDoc} 821 * @return {@inheritDoc} 822 */ 659 823 public boolean isInQuote(Buffer buffer, Position pos) 660 824 { … … 684 848 } 685 849 850 /** 851 * {@inheritDoc} 852 * The default is <code>false</code>. 853 * 854 * @param buffer {@inheritDoc} 855 * @param pos {@inheritDoc} 856 * @return {@inheritDoc} 857 */ 686 858 public boolean isInComment(Buffer buffer, Position pos) 687 859 { … … 689 861 } 690 862 863 /** 864 * {@inheritDoc} 865 * The default is <code>false</code>. 866 * 867 * @param line {@inheritDoc} 868 * @return {@inheritDoc} 869 */ 691 870 public boolean isCommentLine(Line line) 692 871 { … … 694 873 } 695 874 875 /** 876 * {@inheritDoc} 877 * The default is to return the original character. 878 * 879 * @param editor {@inheritDoc} 880 * @param c {@inheritDoc} 881 * @return {@inheritDoc} 882 */ 696 883 public char fixCase(Editor editor, char c) 697 884 { … … 699 886 } 700 887 888 /** 889 * {@inheritDoc} 890 * The default is to return the tag before the cursor position, if the 891 * buffer has tags. 892 * 893 * @param editor {@inheritDoc} 894 * @param verbose {@inheritDoc} 895 * @return {@inheritDoc} 896 */ 701 897 public String getContextString(Editor editor, boolean verbose) 702 898 { … … 723 919 } 724 920 921 /** 922 * {@inheritDoc} 923 * The default is <code>null</code>. 924 * 925 * @param editor {@inheritDoc} 926 * @param pos {@inheritDoc} 927 * @return {@inheritDoc} 928 */ 725 929 public String getMouseMovedContextString(Editor editor, Position pos) 726 930 { … … 728 932 } 729 933 934 /** 935 * {@inheritDoc} 936 * The default is <code>null</code>. 937 * 938 * @param editor {@inheritDoc} 939 * @param e {@inheritDoc} 940 * @return {@inheritDoc} 941 */ 730 942 public String getToolTipText(Editor editor, MouseEvent e) 731 943 { … … 733 945 } 734 946 947 /** 948 * {@inheritDoc} 949 * The default is to do nothing. 950 * 951 * @param buffer {@inheritDoc} 952 * @param file {@inheritDoc} 953 * @return {@inheritDoc} 954 */ 735 955 public void loadFile(Buffer buffer, File file) 736 956 { -
trunk/j/src/org/armedbear/j/Mode.java
r2 r17 3 3 * 4 4 * Copyright (C) 1998-2002 Peter Graves 5 * $Id: Mode.java,v 1. 1.1.1 2002-09-24 16:09:36piso Exp $5 * $Id: Mode.java,v 1.2 2002-10-01 19:20:22 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 175 175 /** 176 176 * Returns a navigation component for the specified <code>Editor</code>, 177 * or <code>null</code> if there is n avigation component for this mode.177 * or <code>null</code> if there is no navigation component for this mode. 178 178 * <p> 179 179 * The navigation component appears in the lower pane of the sidebar. … … 186 186 /** 187 187 * Most useful for programming language modes, this method returns 188 * either a <code>Tagger</code> for this mode, or null. If a188 * either a <code>Tagger</code> for this mode, or <code>null</code>. If a 189 189 * <code>Tagger</code> is returned, then 190 * {@link #isTaggable() isTaggable()} needs toreturn <code>true</code>.191 * Otherwise i sshould return <code>false</code>.190 * {@link #isTaggable() isTaggable()} must return <code>true</code>. 191 * Otherwise it should return <code>false</code>. 192 192 * 193 193 * @param buffer the current buffer … … 200 200 /** 201 201 * Returns whether or not this mode has a {@link Tagger Tagger} 202 * associated with it. This should return<code>false</code> if202 * associated with it. This returns <code>false</code> if 203 203 * {@link #getTagger(SystemBuffer) getTagger()} returns <code>null</code>, 204 204 * and <code>true</code> otherwise. … … 231 231 * Returns whether or not this mode will potentially perform context 232 232 * sensitive indentation on a given <code>Line</code> in a given 233 * <code>Buffer</code>. This should return<code>true</code> if233 * <code>Buffer</code>. This returns <code>true</code> if 234 234 * {@link #getCorrectIndentation(Line, Buffer) getCorrectIndentation()} 235 235 * might return something other than zero, <code>false</code> otherwise. … … 243 243 /** 244 244 * Returns whether or not this mode will potentially perform context 245 * sensitive indentation for a paste operation. This should return245 * sensitive indentation for a paste operation. This returns 246 246 * <code>true</code> if 247 247 * {@link #getCorrectIndentation(Line, Buffer) getCorrectIndentation()} … … 461 461 /** 462 462 * Returns a string that describes something about the current mouse 463 * position that is suitable to be displayed in the <code>StatusBar</code>. 463 * position that is suitable to be displayed in the <code>StatusBar</code>, 464 * or <code>null</code> if there is none. 464 465 * 465 466 * @param editor the <code>Editor</code> for context. … … 470 471 /** 471 472 * Returns a string that describes something about the current mouse 472 * position that is suitable to be displayed as a tool tip. 473 * position that is suitable to be displayed as a tool tip, or 474 * <code>null</code> if there is none. 473 475 * 474 476 * @param editor the <code>Editor</code> for context.
Note: See TracChangeset
for help on using the changeset viewer.