Changeset 17


Ignore:
Timestamp:
10/01/02 19:21:28 (20 years ago)
Author:
piso
Message:

Javadoc (Mike Ritter).

Location:
trunk/j/src/org/armedbear/j
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/AbstractMode.java

    r2 r17  
    33 *
    44 * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: AbstractMode.java,v 1.1.1.1 2002-09-24 16:08:19 piso Exp $
     5 * $Id: AbstractMode.java,v 1.2 2002-10-01 19:21:28 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    201201    }
    202202
     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     */
    203222    public void populateMenu(Editor editor, Menu menu)
    204223    {
     
    344363    }
    345364
     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     */
    346384    public JPopupMenu getContextMenu(Editor editor)
    347385    {
     
    419457    }
    420458
     459    /**
     460     * {@inheritDoc}
     461     * This returns the default toolbar from <code>frame</code>.
     462     *
     463     * @param frame     {@inheritDoc}
     464     * @return          {@inheritDoc}
     465     */
    421466    public ToolBar getToolBar(Frame frame)
    422467    {
     
    432477    }
    433478
     479    /**
     480     * {@inheritDoc}
     481     * The default is <code>null</code>.
     482     *
     483     * @param buffer    {@inheritDoc}
     484     * @return          {@inheritDoc}
     485     */
    434486    public Tagger getTagger(SystemBuffer buffer)
    435487    {
     
    437489    }
    438490
     491    /**
     492     * {@inheritDoc}
     493     * The default is <code>false</code>.
     494     *
     495     * @return          {@inheritDoc}
     496     */
    439497    public boolean isTaggable()
    440498    {
     
    442500    }
    443501
     502    /**
     503     * {@inheritDoc}
     504     * The default is <code>false</code>.
     505     *
     506     * @return          {@inheritDoc}
     507     */
    444508    public boolean hasQualifiedNames()
    445509    {
     
    447511    }
    448512
     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     */
    449521    public boolean isQualifiedName(String s)
    450522    {
     
    452524    }
    453525
     526    /**
     527     * {@inheritDoc}
     528     * The default is <code>false</code>.
     529     *
     530     * @return          {@inheritDoc}
     531     */
    454532    public boolean canIndent()
    455533    {
     
    457535    }
    458536
     537    /**
     538     * {@inheritDoc}
     539     * The default is <code>false</code>.
     540     *
     541     * @return          {@inheritDoc}
     542     */
    459543    public boolean canIndentPaste()
    460544    {
     
    462546    }
    463547
     548    /**
     549     * {@inheritDoc}
     550     * The default is 0.
     551     *
     552     * @param line      {@inheritDoc}
     553     * @param buffer    {@inheritDoc}
     554     * @return          {@inheritDoc}
     555     */
    464556    public int getCorrectIndentation(Line line, Buffer buffer)
    465557    {
     
    467559    }
    468560
     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     */
    469569    public SyntaxIterator getSyntaxIterator(Position pos)
    470570    {
     
    472572    }
    473573
     574    /**
     575     * {@inheritDoc}
     576     * The default is <code>null</code>.
     577     *
     578     * @return          {@inheritDoc}
     579     */
    474580    public String getCommentStart()
    475581    {
     
    477583    }
    478584
     585    /**
     586     * {@inheritDoc}
     587     * The default is <code>null</code>.
     588     *
     589     * @return          {@inheritDoc}
     590     */
    479591    public String getCommentEnd()
    480592    {
     
    602714    }
    603715
     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     */
    604724    public void setProperty(Property property, String value)
    605725    {
     
    609729    }
    610730
     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     */
    611739    public void setProperty(Property property, boolean value)
    612740    {
     
    616744    }
    617745
     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     */
    618754    public void setProperty(Property property, int value)
    619755    {
     
    623759    }
    624760
     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     */
    625767    protected Object getDefaultValue(Property property)
    626768    {
     
    647789    }
    648790
     791    /**
     792     * {@inheritDoc}
     793     * The default is the result of Character.isJavaIdentifierStart(char).
     794     *
     795     * @return          {@inheritDoc}
     796     */
    649797    public boolean isIdentifierStart(char c)
    650798    {
     
    652800    }
    653801
     802    /**
     803     * {@inheritDoc}
     804     * The default is the result of Character.isJavaIdentifierPart(char).
     805     *
     806     * @return          {@inheritDoc}
     807     */
    654808    public boolean isIdentifierPart(char c)
    655809    {
     
    657811    }
    658812
     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     */
    659823    public boolean isInQuote(Buffer buffer, Position pos)
    660824    {
     
    684848    }
    685849
     850    /**
     851     * {@inheritDoc}
     852     * The default is <code>false</code>.
     853     *
     854     * @param buffer    {@inheritDoc}
     855     * @param pos       {@inheritDoc}
     856     * @return          {@inheritDoc}
     857     */
    686858    public boolean isInComment(Buffer buffer, Position pos)
    687859    {
     
    689861    }
    690862
     863    /**
     864     * {@inheritDoc}
     865     * The default is <code>false</code>.
     866     *
     867     * @param line      {@inheritDoc}
     868     * @return          {@inheritDoc}
     869     */
    691870    public boolean isCommentLine(Line line)
    692871    {
     
    694873    }
    695874
     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     */
    696883    public char fixCase(Editor editor, char c)
    697884    {
     
    699886    }
    700887
     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     */
    701897    public String getContextString(Editor editor, boolean verbose)
    702898    {
     
    723919    }
    724920
     921    /**
     922     * {@inheritDoc}
     923     * The default is <code>null</code>.
     924     *
     925     * @param editor    {@inheritDoc}
     926     * @param pos       {@inheritDoc}
     927     * @return          {@inheritDoc}
     928     */
    725929    public String getMouseMovedContextString(Editor editor, Position pos)
    726930    {
     
    728932    }
    729933
     934    /**
     935     * {@inheritDoc}
     936     * The default is <code>null</code>.
     937     *
     938     * @param editor    {@inheritDoc}
     939     * @param e         {@inheritDoc}
     940     * @return          {@inheritDoc}
     941     */
    730942    public String getToolTipText(Editor editor, MouseEvent e)
    731943    {
     
    733945    }
    734946
     947    /**
     948     * {@inheritDoc}
     949     * The default is to do nothing.
     950     *
     951     * @param buffer    {@inheritDoc}
     952     * @param file      {@inheritDoc}
     953     * @return          {@inheritDoc}
     954     */
    735955    public void loadFile(Buffer buffer, File file)
    736956    {
  • trunk/j/src/org/armedbear/j/Mode.java

    r2 r17  
    33 *
    44 * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: Mode.java,v 1.1.1.1 2002-09-24 16:09:36 piso Exp $
     5 * $Id: Mode.java,v 1.2 2002-10-01 19:20:22 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    175175    /**
    176176     * Returns a navigation component for the specified <code>Editor</code>,
    177      * or <code>null</code> if there is navigation component for this mode.
     177     * or <code>null</code> if there is no navigation component for this mode.
    178178     * <p>
    179179     * The navigation component appears in the lower pane of the sidebar.
     
    186186    /**
    187187     * Most useful for programming language modes, this method returns
    188      * either a <code>Tagger</code> for this mode, or null.  If a
     188     * either a <code>Tagger</code> for this mode, or <code>null</code>.  If a
    189189     * <code>Tagger</code> is returned, then
    190      * {@link #isTaggable() isTaggable()} needs to return <code>true</code>.
    191      * Otherwise is should return <code>false</code>.
     190     * {@link #isTaggable() isTaggable()} must return <code>true</code>.
     191     * Otherwise it should return <code>false</code>.
    192192     *
    193193     * @param buffer    the current buffer
     
    200200    /**
    201201     * Returns whether or not this mode has a {@link Tagger Tagger}
    202      * associated with it.  This should return <code>false</code> if
     202     * associated with it.  This returns <code>false</code> if
    203203     * {@link #getTagger(SystemBuffer) getTagger()} returns <code>null</code>,
    204204     * and <code>true</code> otherwise.
     
    231231     * Returns whether or not this mode will potentially perform context
    232232     * sensitive indentation on a given <code>Line</code> in a given
    233      * <code>Buffer</code>.  This should return <code>true</code> if
     233     * <code>Buffer</code>.  This returns <code>true</code> if
    234234     * {@link #getCorrectIndentation(Line, Buffer) getCorrectIndentation()}
    235235     * might return something other than zero, <code>false</code> otherwise.
     
    243243    /**
    244244     * Returns whether or not this mode will potentially perform context
    245      * sensitive indentation for a paste operation.  This should return
     245     * sensitive indentation for a paste operation.  This returns
    246246     * <code>true</code> if
    247247     * {@link #getCorrectIndentation(Line, Buffer) getCorrectIndentation()}
     
    461461    /**
    462462     * 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.
    464465     *
    465466     * @param editor    the <code>Editor</code> for context.
     
    470471    /**
    471472     * 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.
    473475     *
    474476     * @param editor    the <code>Editor</code> for context.
Note: See TracChangeset for help on using the changeset viewer.