home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / EnvironmentFormatOptions.java < prev    next >
Text File  |  1998-10-25  |  13KB  |  277 lines

  1. /*
  2.  * Copyright 1998 Symantec Corporation, All Rights Reserved.
  3.  */
  4.  
  5. package com.symantec.itools.vcafe.openapi.options;
  6.  
  7. /**
  8.  * The API used to represent and access the format-related options of the Visual Cafe environment.
  9.  * These options that appear in the "Format" tab in the Environment Options dialog.
  10.  * <p>Use <code>EnvironmentOptionSet.getFormatOptions()</code> to get an instance of this object.
  11.  *
  12.  * @see com.symantec.itools.vcafe.openapi.VisualCafe#getEnvironmentOptionSet
  13.  * @see EnvironmentOptionSet#getFormatOptions
  14.  *
  15.  * @author Symantec Internet Tools Division
  16.  * @version 1.0
  17.  * @since VCafe 3.0
  18.  */
  19. public abstract class EnvironmentFormatOptions
  20. {
  21.         /**
  22.          * Indicates the requested format option pertains to untitled windows.
  23.          */
  24.         public static final String    FORMATFOR_UNTITLED = "<Untitled>";
  25.         /**
  26.          * Indicates the requested format option pertains to unknown/unmapped windows.
  27.          */
  28.         public static final String    FORMATFOR_UNKNOWN = "<Unknown>";
  29.         /**
  30.          * Indicates the requested format option pertains to .java windows.
  31.          */
  32.         public static final String    FORMATFOR_JAVA = "java";
  33.         /**
  34.          * Indicates the requested format option pertains to .html windows.
  35.          */
  36.         public static final String    FORMATFOR_HTML = "html";
  37.         /**
  38.          * Indicates the requested format option pertains to .idl windows.
  39.          */
  40.         public static final String    FORMATFOR_IDL = "idl";
  41.  
  42.     /**
  43.      * Determines whether while typing, lines that extend beyond the right margin are automatically
  44.      * broken at the last word boundary before the margin.
  45.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  46.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  47.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  48.      * <li>FORMATFOR_JAVA - format options for java windows,
  49.      * <li>FORMATFOR_HTML - format options for html windows,
  50.      * <li>FORMATFOR_IDL - format options for idl windows, or
  51.      * <li> any other extension that for which you've added format options.
  52.      * </ul>
  53.      * @return <code>true</code> if word wrap is enabled, <code>false</code> otherwise.
  54.      */
  55.     public abstract boolean isWordWrap(String formatFor);
  56.  
  57.     /**
  58.      * Determines whether while typing, if you type a right parenthesis, square bracket, or brace, the editor
  59.      * briefly highlights the corresponding left delimiter.
  60.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  61.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  62.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  63.      * <li>FORMATFOR_JAVA - format options for java windows,
  64.      * <li>FORMATFOR_HTML - format options for html windows,
  65.      * <li>FORMATFOR_IDL - format options for idl windows, or
  66.      * <li> any other extension that for which you've added format options.
  67.      * </ul>
  68.      * @return <code>true</code> if delimiter checking is enabled, <code>false</code> otherwise.
  69.      */
  70.     public abstract boolean isCheckDelimiters(String formatFor);
  71.  
  72.     /**
  73.      * Determines whether while typing, if the last character typed on a line is a left brace, the next line
  74.      * is automatically indented by an extra tab stop. This option only works if Indent Automatically is 
  75.      * selected in the buffer.
  76.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  77.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  78.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  79.      * <li>FORMATFOR_JAVA - format options for java windows,
  80.      * <li>FORMATFOR_HTML - format options for html windows,
  81.      * <li>FORMATFOR_IDL - format options for idl windows, or
  82.      * <li> any other extension that for which you've added format options.
  83.      * </ul>
  84.      * @return <code>true</code> if post-brace indenting is enabled, <code>false</code> otherwise.
  85.      */
  86.     public abstract boolean isIndentAfterBrace(String formatFor);
  87.  
  88.     /**
  89.      * Determines whether while typing, newlines are automatically indented. When you press ENTER, the editor
  90.      * positions the cursor directly below the first character in the previous line.
  91.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  92.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  93.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  94.      * <li>FORMATFOR_JAVA - format options for java windows,
  95.      * <li>FORMATFOR_HTML - format options for html windows,
  96.      * <li>FORMATFOR_IDL - format options for idl windows, or
  97.      * <li> any other extension that for which you've added format options.
  98.      * </ul>
  99.      * @return <code>true</code> if new lines are indented, <code>false</code> otherwise.
  100.      */
  101.     public abstract boolean isIndentAutomatically(String formatFor);
  102.  
  103.     /**
  104.      * Determines whether while typing, tabs are inserted into the text as an appropriate number of spaces,
  105.      * rather than as tab characters.
  106.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  107.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  108.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  109.      * <li>FORMATFOR_JAVA - format options for java windows,
  110.      * <li>FORMATFOR_HTML - format options for html windows,
  111.      * <li>FORMATFOR_IDL - format options for idl windows, or
  112.      * <li> any other extension that for which you've added format options.
  113.      * </ul>
  114.      * @return <code>true</code> if tabs are changed to spaces, <code>false</code> otherwise.
  115.      */
  116.     public abstract boolean isChangeTabsToSpaces(String formatFor);
  117.  
  118.     /**
  119.      * Determines whether trailing spaces and tabs are removed from the end of each line when a
  120.      * file is saved.
  121.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  122.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  123.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  124.      * <li>FORMATFOR_JAVA - format options for java windows,
  125.      * <li>FORMATFOR_HTML - format options for html windows,
  126.      * <li>FORMATFOR_IDL - format options for idl windows, or
  127.      * <li> any other extension that for which you've added format options.
  128.      * </ul>
  129.      * @return <code>true</code> if trailing spaces are removed, <code>false</code> otherwise.
  130.      */
  131.     public abstract boolean isRemoveTrailingSpaces(String formatFor);
  132.  
  133.     /**
  134.      * Determines if custom keywords are highlighted in this type of window.
  135.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  136.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  137.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  138.      * <li>FORMATFOR_JAVA - format options for java windows,
  139.      * <li>FORMATFOR_HTML - format options for html windows,
  140.      * <li>FORMATFOR_IDL - format options for idl windows, or
  141.      * <li> any other extension that for which you've added format options.
  142.      * </ul>
  143.      * @return <code>true</code> if custom keyword highlighting is enabled, <code>false</code> otherwise.
  144.      */
  145.     public abstract boolean isEnableCustomKeywords(String formatFor);
  146.  
  147.     /**
  148.      * Determines whether while typing comments, the editor automatically indents it to a
  149.      * specified alignment column when you type "//" or "/*" to start a comment.
  150.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  151.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  152.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  153.      * <li>FORMATFOR_JAVA - format options for java windows,
  154.      * <li>FORMATFOR_HTML - format options for html windows,
  155.      * <li>FORMATFOR_IDL - format options for idl windows, or
  156.      * <li> any other extension that for which you've added format options.
  157.      * </ul>
  158.      * @return <code>true</code> if comments are automatically indented, <code>false</code> otherwise.
  159.      */
  160.     public abstract boolean isIndentComments(String formatFor);
  161.  
  162.     /**
  163.      * Gets the comment indentation column. This setting is only applicable if <code>isIndentComments</code> is
  164.      * <code>true</code>.
  165.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  166.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  167.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  168.      * <li>FORMATFOR_JAVA - format options for java windows,
  169.      * <li>FORMATFOR_HTML - format options for html windows,
  170.      * <li>FORMATFOR_IDL - format options for idl windows, or
  171.      * <li> any other extension that for which you've added format options.
  172.      * </ul>
  173.      * @return the column to indent comments to.
  174.      */
  175.     public abstract int getIndentCommentsAt(String formatFor);
  176.  
  177.  
  178.         /**
  179.          * Indicates no syntax or keyword highlighting.
  180.          * @see #getLanguageSyntax
  181.          */
  182.         public static final int        LANGUAGESYNTAX_NONE = 0;
  183.  
  184.         /**
  185.          * Indicates Java syntax and keyword highlighting.
  186.          * @see #getLanguageSyntax
  187.          */
  188.         public static final int        LANGUAGESYNTAX_JAVA = 1;
  189.  
  190.         /**
  191.          * Indicates Html syntax and keyword highlighting.
  192.          * @see #getLanguageSyntax
  193.          */
  194.         public static final int        LANGUAGESYNTAX_HTML = 2;
  195.  
  196.         /**
  197.          * Indicates C++ syntax and keyword highlighting.
  198.          * @see #getLanguageSyntax
  199.          */
  200.         public static final int        LANGUAGESYNTAX_CPP = 3;
  201.  
  202.         /**
  203.          * Indicates MFC syntax and keyword highlighting.
  204.          * @see #getLanguageSyntax
  205.          */
  206.         public static final int        LANGUAGESYNTAX_MFC = 4;
  207.  
  208.         /**
  209.          * Indicates IDL syntax and keyword highlighting.
  210.          * @see #getLanguageSyntax
  211.          */
  212.         public static final int        LANGUAGESYNTAX_IDL = 5;
  213.  
  214.     /**
  215.      * Gets the language used for syntax and keyword highlighting for this type of window.
  216.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  217.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  218.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  219.      * <li>FORMATFOR_JAVA - format options for java windows,
  220.      * <li>FORMATFOR_HTML - format options for html windows,
  221.      * <li>FORMATFOR_IDL - format options for idl windows, or
  222.      * <li> any other extension that for which you've added format options.
  223.      * </ul>
  224.      * @return the language for this window.  Can be one of:<ul type=circle>
  225.      * <li>LANGUAGESYNTAX_NONE - indicates no syntax highlighting,
  226.      * <li>LANGUAGESYNTAX_JAVA - highlighting for Java keywords,
  227.      * <li>LANGUAGESYNTAX_HTML - highlighting for Html keywords,
  228.      * <li>LANGUAGESYNTAX_CPP - highlighting for C++ keywords,
  229.      * <li>LANGUAGESYNTAX_MFC - highlighting for MFC keywords, or
  230.      * <li>LANGUAGESYNTAX_IDL - highlighting for idl keywords.
  231.      * </ul>
  232.      */
  233.     public abstract int getLanguageSyntax(String formatFor);
  234.  
  235.     /**
  236.      * Gets the number of columns between tab stops (1-16). The default is four character widths.
  237.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  238.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  239.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  240.      * <li>FORMATFOR_JAVA - format options for java windows,
  241.      * <li>FORMATFOR_HTML - format options for html windows,
  242.      * <li>FORMATFOR_IDL - format options for idl windows, or
  243.      * <li> any other extension that for which you've added format options.
  244.      * </ul>
  245.      * @return the number of columns between tab stops.
  246.      */
  247.     public abstract int getTabWidth(String formatFor);
  248.  
  249.     /**
  250.      * Gets the number of columns to indent lines.
  251.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  252.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  253.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  254.      * <li>FORMATFOR_JAVA - format options for java windows,
  255.      * <li>FORMATFOR_HTML - format options for html windows,
  256.      * <li>FORMATFOR_IDL - format options for idl windows, or
  257.      * <li> any other extension that for which you've added format options.
  258.      * </ul>
  259.      * @return the number of columns for line indentation.
  260.      */
  261.     public abstract int getIndentWidth(String formatFor);
  262.  
  263.     /**
  264.      * Gets the column that acts as the right margin for word wrapping. (1-512).
  265.      * @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
  266.      * <li>FORMATFOR_UNTITLED - format options for untitled windows,
  267.      * <li>FORMATFOR_UNKNOWN - format options for unknown windows,
  268.      * <li>FORMATFOR_JAVA - format options for java windows,
  269.      * <li>FORMATFOR_HTML - format options for html windows,
  270.      * <li>FORMATFOR_IDL - format options for idl windows, or
  271.      * <li> any other extension that for which you've added format options.
  272.      * </ul>
  273.      * @return the right margin column.
  274.      */
  275.     public abstract int getRightMargin(String formatFor);
  276. }
  277.