blob: 571a05d6e43d9367125341ba634ba533b38136f7 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_12) on Fri May 30 11:15:59 CDT 2008 -->
<TITLE>
IndentManipulation
</TITLE>
<META NAME="keywords" CONTENT="org.eclipse.wst.jsdt.core.formatter.IndentManipulation class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="IndentManipulation";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IndentManipulation.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/DefaultCodeFormatterConstants.html" title="class in org.eclipse.wst.jsdt.core.formatter"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IndentManipulation.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.eclipse.wst.jsdt.core.formatter</FONT>
<BR>
Class IndentManipulation</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.eclipse.wst.jsdt.core.formatter.IndentManipulation</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>IndentManipulation</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Helper class to provide String manipulation functions dealing with indentations.
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#changeIndent(java.lang.String, int, int, int, java.lang.String, java.lang.String)">changeIndent</A></B>(java.lang.String&nbsp;code,
int&nbsp;indentUnitsToRemove,
int&nbsp;tabWidth,
int&nbsp;indentWidth,
java.lang.String&nbsp;newIndentString,
java.lang.String&nbsp;lineDelim)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change the indent of a, possible multiple line, code string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#extractIndentString(java.lang.String, int, int)">extractIndentString</A></B>(java.lang.String&nbsp;line,
int&nbsp;tabWidth,
int&nbsp;indentWidth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the leading indentation string of the given line.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;ReplaceEdit[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#getChangeIndentEdits(java.lang.String, int, int, int, java.lang.String)">getChangeIndentEdits</A></B>(java.lang.String&nbsp;source,
int&nbsp;indentUnitsToRemove,
int&nbsp;tabWidth,
int&nbsp;indentWidth,
java.lang.String&nbsp;newIndentString)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the text edits retrieved after changing the indentation of a, possible multi-line, code string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#getIndentWidth(java.util.Map)">getIndentWidth</A></B>(java.util.Map&nbsp;options)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the tab width as configured in the given map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#getTabWidth(java.util.Map)">getTabWidth</A></B>(java.util.Map&nbsp;options)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the tab width as configured in the given map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#isIndentChar(char)">isIndentChar</A></B>(char&nbsp;ch)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the given character is an indentation character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#isLineDelimiterChar(char)">isLineDelimiterChar</A></B>(char&nbsp;ch)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the given character is a line delimiter character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#measureIndentInSpaces(java.lang.CharSequence, int)">measureIndentInSpaces</A></B>(java.lang.CharSequence&nbsp;line,
int&nbsp;tabWidth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the indentation of the given line in space equivalents.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#measureIndentUnits(java.lang.CharSequence, int, int)">measureIndentUnits</A></B>(java.lang.CharSequence&nbsp;line,
int&nbsp;tabWidth,
int&nbsp;indentWidth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the indentation of the given line in indentation units.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html#trimIndent(java.lang.String, int, int, int)">trimIndent</A></B>(java.lang.String&nbsp;line,
int&nbsp;indentUnitsToRemove,
int&nbsp;tabWidth,
int&nbsp;indentWidth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the given number of indentation units from a given line.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="isIndentChar(char)"><!-- --></A><H3>
isIndentChar</H3>
<PRE>
public static boolean <B>isIndentChar</B>(char&nbsp;ch)</PRE>
<DL>
<DD>Returns <code>true</code> if the given character is an indentation character. Indentation character are all whitespace characters
except the line delimiter characters.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - the given character
<DT><B>Returns:</B><DD>Returns <code>true</code> if this the character is a indent character, <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="isLineDelimiterChar(char)"><!-- --></A><H3>
isLineDelimiterChar</H3>
<PRE>
public static boolean <B>isLineDelimiterChar</B>(char&nbsp;ch)</PRE>
<DL>
<DD>Returns <code>true</code> if the given character is a line delimiter character.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - the given character
<DT><B>Returns:</B><DD>Returns <code>true</code> if this the character is a line delimiter character, <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="measureIndentUnits(java.lang.CharSequence, int, int)"><!-- --></A><H3>
measureIndentUnits</H3>
<PRE>
public static int <B>measureIndentUnits</B>(java.lang.CharSequence&nbsp;line,
int&nbsp;tabWidth,
int&nbsp;indentWidth)</PRE>
<DL>
<DD>Returns the indentation of the given line in indentation units. Odd spaces are
not counted. This method only analyzes the content of <code>line</code> up to the first
non-whitespace character.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>line</CODE> - the string to measure the indent of<DD><CODE>tabWidth</CODE> - the width of one tab character in space equivalents<DD><CODE>indentWidth</CODE> - the width of one indentation unit in space equivalents
<DT><B>Returns:</B><DD>the number of indentation units that line is indented by
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if:
<ul>
<li>the given <code>indentWidth</code> is lower or equals to zero</li>
<li>the given <code>tabWidth</code> is lower than zero</li>
<li>the given <code>line</code> is null</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="measureIndentInSpaces(java.lang.CharSequence, int)"><!-- --></A><H3>
measureIndentInSpaces</H3>
<PRE>
public static int <B>measureIndentInSpaces</B>(java.lang.CharSequence&nbsp;line,
int&nbsp;tabWidth)</PRE>
<DL>
<DD>Returns the indentation of the given line in space equivalents.
<p>Tab characters are counted using the given <code>tabWidth</code> and every other indent
character as one. This method analyzes the content of <code>line</code> up to the first
non-whitespace character.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>line</CODE> - the string to measure the indent of<DD><CODE>tabWidth</CODE> - the width of one tab in space equivalents
<DT><B>Returns:</B><DD>the measured indent width in space equivalents
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if:
<ul>
<li>the given <code>line</code> is null</li>
<li>the given <code>tabWidth</code> is lower than zero</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="extractIndentString(java.lang.String, int, int)"><!-- --></A><H3>
extractIndentString</H3>
<PRE>
public static java.lang.String <B>extractIndentString</B>(java.lang.String&nbsp;line,
int&nbsp;tabWidth,
int&nbsp;indentWidth)</PRE>
<DL>
<DD>Returns the leading indentation string of the given line. Note that the returned string
need not be equal to the leading whitespace as odd spaces are not considered part of the
indentation.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>line</CODE> - the line to scan<DD><CODE>tabWidth</CODE> - the size of one tab in space equivalents<DD><CODE>indentWidth</CODE> - the width of one indentation unit in space equivalents
<DT><B>Returns:</B><DD>the indent part of <code>line</code>, but no odd spaces
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if:
<ul>
<li>the given <code>indentWidth</code> is lower or equals to zero</li>
<li>the given <code>tabWidth</code> is lower than zero</li>
<li>the given <code>line</code> is null</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="trimIndent(java.lang.String, int, int, int)"><!-- --></A><H3>
trimIndent</H3>
<PRE>
public static java.lang.String <B>trimIndent</B>(java.lang.String&nbsp;line,
int&nbsp;indentUnitsToRemove,
int&nbsp;tabWidth,
int&nbsp;indentWidth)</PRE>
<DL>
<DD>Removes the given number of indentation units from a given line. If the line
has less than the given indent, all the available indentation is removed.
If <code>indentsToRemove <= 0</code> the line is returned.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>line</CODE> - the line to trim<DD><CODE>tabWidth</CODE> - the width of one tab in space equivalents<DD><CODE>indentWidth</CODE> - the width of one indentation unit in space equivalents
<DT><B>Returns:</B><DD>the trimmed string
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if:
<ul>
<li>the given <code>indentWidth</code> is lower or equals to zero</li>
<li>the given <code>tabWidth</code> is lower than zero</li>
<li>the given <code>line</code> is null</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="changeIndent(java.lang.String, int, int, int, java.lang.String, java.lang.String)"><!-- --></A><H3>
changeIndent</H3>
<PRE>
public static java.lang.String <B>changeIndent</B>(java.lang.String&nbsp;code,
int&nbsp;indentUnitsToRemove,
int&nbsp;tabWidth,
int&nbsp;indentWidth,
java.lang.String&nbsp;newIndentString,
java.lang.String&nbsp;lineDelim)</PRE>
<DL>
<DD>Change the indent of a, possible multiple line, code string. The given number of indent units is removed,
and a new indent string is added.
<p>The first line of the code will not be changed (It is considered to have no indent as it might start in
the middle of a line).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>code</CODE> - the code to change the indent of<DD><CODE>indentUnitsToRemove</CODE> - the number of indent units to remove from each line (except the first) of the given code<DD><CODE>tabWidth</CODE> - the size of one tab in space equivalents<DD><CODE>indentWidth</CODE> - the width of one indentation unit in space equivalents<DD><CODE>newIndentString</CODE> - the new indent string to be added to all lines (except the first)<DD><CODE>lineDelim</CODE> - the new line delimiter to be used. The returned code will contain only this line delimiter.
<DT><B>Returns:</B><DD>the newly indent code, containing only the given line delimiters.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if:
<ul>
<li>the given <code>indentWidth</code> is lower or equals to zero</li>
<li>the given <code>tabWidth</code> is lower than zero</li>
<li>the given <code>code</code> is null</li>
<li>the given <code>indentUnitsToRemove</code> is lower than zero</li>
<li>the given <code>newIndentString</code> is null</li>
<li>the given <code>lineDelim</code> is null</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="getChangeIndentEdits(java.lang.String, int, int, int, java.lang.String)"><!-- --></A><H3>
getChangeIndentEdits</H3>
<PRE>
public static ReplaceEdit[] <B>getChangeIndentEdits</B>(java.lang.String&nbsp;source,
int&nbsp;indentUnitsToRemove,
int&nbsp;tabWidth,
int&nbsp;indentWidth,
java.lang.String&nbsp;newIndentString)</PRE>
<DL>
<DD>Returns the text edits retrieved after changing the indentation of a, possible multi-line, code string.
<p>The given number of indent units is removed, and a new indent string is added.</p>
<p>The first line of the code will not be changed (It is considered to have no indent as it might start in
the middle of a line).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - The code to change the indent of<DD><CODE>indentUnitsToRemove</CODE> - the number of indent units to remove from each line (except the first) of the given code<DD><CODE>tabWidth</CODE> - the size of one tab in space equivalents<DD><CODE>indentWidth</CODE> - the width of one indentation unit in space equivalents<DD><CODE>newIndentString</CODE> - the new indent string to be added to all lines (except the first)
<DT><B>Returns:</B><DD>returns the resulting text edits
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if:
<ul>
<li>the given <code>indentWidth</code> is lower or equals to zero</li>
<li>the given <code>tabWidth</code> is lower than zero</li>
<li>the given <code>source</code> is null</li>
<li>the given <code>indentUnitsToRemove</code> is lower than zero</li>
<li>the given <code>newIndentString</code> is null</li>
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="getTabWidth(java.util.Map)"><!-- --></A><H3>
getTabWidth</H3>
<PRE>
public static int <B>getTabWidth</B>(java.util.Map&nbsp;options)</PRE>
<DL>
<DD>Returns the tab width as configured in the given map.
<p>Use <A HREF="../../../../../../org/eclipse/wst/jsdt/core/IJavaScriptProject.html#getOptions(boolean)"><CODE>IJavaScriptProject.getOptions(boolean)</CODE></A> to get the most current project options.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>options</CODE> - the map to get the formatter settings from.
<DT><B>Returns:</B><DD>the tab width
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the given <code>options</code> is null</DL>
</DD>
</DL>
<HR>
<A NAME="getIndentWidth(java.util.Map)"><!-- --></A><H3>
getIndentWidth</H3>
<PRE>
public static int <B>getIndentWidth</B>(java.util.Map&nbsp;options)</PRE>
<DL>
<DD>Returns the tab width as configured in the given map.
<p>Use <A HREF="../../../../../../org/eclipse/wst/jsdt/core/IJavaScriptProject.html#getOptions(boolean)"><CODE>IJavaScriptProject.getOptions(boolean)</CODE></A> to get the most current project options.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>options</CODE> - the map to get the formatter settings from
<DT><B>Returns:</B><DD>the indent width
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the given <code>options</code> is null</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/IndentManipulation.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/eclipse/wst/jsdt/core/formatter/DefaultCodeFormatterConstants.html" title="class in org.eclipse.wst.jsdt.core.formatter"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/eclipse/wst/jsdt/core/formatter/IndentManipulation.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="IndentManipulation.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>