home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
EnvironmentFormatOptions.java
< prev
next >
Wrap
Text File
|
1998-10-25
|
13KB
|
277 lines
/*
* Copyright 1998 Symantec Corporation, All Rights Reserved.
*/
package com.symantec.itools.vcafe.openapi.options;
/**
* The API used to represent and access the format-related options of the Visual Cafe environment.
* These options that appear in the "Format" tab in the Environment Options dialog.
* <p>Use <code>EnvironmentOptionSet.getFormatOptions()</code> to get an instance of this object.
*
* @see com.symantec.itools.vcafe.openapi.VisualCafe#getEnvironmentOptionSet
* @see EnvironmentOptionSet#getFormatOptions
*
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public abstract class EnvironmentFormatOptions
{
/**
* Indicates the requested format option pertains to untitled windows.
*/
public static final String FORMATFOR_UNTITLED = "<Untitled>";
/**
* Indicates the requested format option pertains to unknown/unmapped windows.
*/
public static final String FORMATFOR_UNKNOWN = "<Unknown>";
/**
* Indicates the requested format option pertains to .java windows.
*/
public static final String FORMATFOR_JAVA = "java";
/**
* Indicates the requested format option pertains to .html windows.
*/
public static final String FORMATFOR_HTML = "html";
/**
* Indicates the requested format option pertains to .idl windows.
*/
public static final String FORMATFOR_IDL = "idl";
/**
* Determines whether while typing, lines that extend beyond the right margin are automatically
* broken at the last word boundary before the margin.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if word wrap is enabled, <code>false</code> otherwise.
*/
public abstract boolean isWordWrap(String formatFor);
/**
* Determines whether while typing, if you type a right parenthesis, square bracket, or brace, the editor
* briefly highlights the corresponding left delimiter.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if delimiter checking is enabled, <code>false</code> otherwise.
*/
public abstract boolean isCheckDelimiters(String formatFor);
/**
* Determines whether while typing, if the last character typed on a line is a left brace, the next line
* is automatically indented by an extra tab stop. This option only works if Indent Automatically is
* selected in the buffer.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if post-brace indenting is enabled, <code>false</code> otherwise.
*/
public abstract boolean isIndentAfterBrace(String formatFor);
/**
* Determines whether while typing, newlines are automatically indented. When you press ENTER, the editor
* positions the cursor directly below the first character in the previous line.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if new lines are indented, <code>false</code> otherwise.
*/
public abstract boolean isIndentAutomatically(String formatFor);
/**
* Determines whether while typing, tabs are inserted into the text as an appropriate number of spaces,
* rather than as tab characters.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if tabs are changed to spaces, <code>false</code> otherwise.
*/
public abstract boolean isChangeTabsToSpaces(String formatFor);
/**
* Determines whether trailing spaces and tabs are removed from the end of each line when a
* file is saved.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if trailing spaces are removed, <code>false</code> otherwise.
*/
public abstract boolean isRemoveTrailingSpaces(String formatFor);
/**
* Determines if custom keywords are highlighted in this type of window.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if custom keyword highlighting is enabled, <code>false</code> otherwise.
*/
public abstract boolean isEnableCustomKeywords(String formatFor);
/**
* Determines whether while typing comments, the editor automatically indents it to a
* specified alignment column when you type "//" or "/*" to start a comment.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return <code>true</code> if comments are automatically indented, <code>false</code> otherwise.
*/
public abstract boolean isIndentComments(String formatFor);
/**
* Gets the comment indentation column. This setting is only applicable if <code>isIndentComments</code> is
* <code>true</code>.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return the column to indent comments to.
*/
public abstract int getIndentCommentsAt(String formatFor);
/**
* Indicates no syntax or keyword highlighting.
* @see #getLanguageSyntax
*/
public static final int LANGUAGESYNTAX_NONE = 0;
/**
* Indicates Java syntax and keyword highlighting.
* @see #getLanguageSyntax
*/
public static final int LANGUAGESYNTAX_JAVA = 1;
/**
* Indicates Html syntax and keyword highlighting.
* @see #getLanguageSyntax
*/
public static final int LANGUAGESYNTAX_HTML = 2;
/**
* Indicates C++ syntax and keyword highlighting.
* @see #getLanguageSyntax
*/
public static final int LANGUAGESYNTAX_CPP = 3;
/**
* Indicates MFC syntax and keyword highlighting.
* @see #getLanguageSyntax
*/
public static final int LANGUAGESYNTAX_MFC = 4;
/**
* Indicates IDL syntax and keyword highlighting.
* @see #getLanguageSyntax
*/
public static final int LANGUAGESYNTAX_IDL = 5;
/**
* Gets the language used for syntax and keyword highlighting for this type of window.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return the language for this window. Can be one of:<ul type=circle>
* <li>LANGUAGESYNTAX_NONE - indicates no syntax highlighting,
* <li>LANGUAGESYNTAX_JAVA - highlighting for Java keywords,
* <li>LANGUAGESYNTAX_HTML - highlighting for Html keywords,
* <li>LANGUAGESYNTAX_CPP - highlighting for C++ keywords,
* <li>LANGUAGESYNTAX_MFC - highlighting for MFC keywords, or
* <li>LANGUAGESYNTAX_IDL - highlighting for idl keywords.
* </ul>
*/
public abstract int getLanguageSyntax(String formatFor);
/**
* Gets the number of columns between tab stops (1-16). The default is four character widths.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return the number of columns between tab stops.
*/
public abstract int getTabWidth(String formatFor);
/**
* Gets the number of columns to indent lines.
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return the number of columns for line indentation.
*/
public abstract int getIndentWidth(String formatFor);
/**
* Gets the column that acts as the right margin for word wrapping. (1-512).
* @param formatFor the type of window for the requested format option. Can be one of:<ul type=circle>
* <li>FORMATFOR_UNTITLED - format options for untitled windows,
* <li>FORMATFOR_UNKNOWN - format options for unknown windows,
* <li>FORMATFOR_JAVA - format options for java windows,
* <li>FORMATFOR_HTML - format options for html windows,
* <li>FORMATFOR_IDL - format options for idl windows, or
* <li> any other extension that for which you've added format options.
* </ul>
* @return the right margin column.
*/
public abstract int getRightMargin(String formatFor);
}