⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 misc.html

📁 This the README for the Eclipse Plug-in distribution of the Jalopy Java Source Code Formatter.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</p><div class="example"><a name="ex-misc-array-brackets"></a><p class="title"><b>Example&nbsp;4.152.&nbsp;Array brackets after type</b></p><table border="0" bgcolor="#E0E0E0" class="shade"><tr><td><pre class="programlisting">int[] a;</pre></td></tr></table></div><p>But C/C++ programmers may expect them to appear after the identifier.</p><div class="example"><a name="ex-misc-array-brackets-identifier"></a><p class="title"><b>Example&nbsp;4.153.&nbsp;Array brackets after identifier</b></p><table border="0" bgcolor="#E0E0E0" class="shade"><tr><td><pre class="programlisting">int a[];</pre></td></tr></table></div><p></p></li><li><p>Force formatting</p><p>Jalopy can keep track of which files have been formatted previously.See <a href="misc.html#misc-history" title="4.3.13.2.&nbsp;History">Section&nbsp;4.3.13.2, &#8220;History&#8221;</a> below. If History is enabled, Jalopy willexclude files that have a modification date coincident with the last formatting.However, you can override this history check to force a format. For example,you might need to update the copyright notice for the whole code base. Enablingthis switch ensures that all source files are always be formatted. Note thatthis switch is only meaningful if the history feature is enabled.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="misc-history"></a>4.3.13.2.&nbsp;History</h4></div></div><div></div></div><a class="indexterm" name="d0e5010"></a><p>The history feature offers a way to optimize the speed at which Jalopy processesof a group of files repeatedly. Using history, Jalopy is able to track filemodifications between successive invocations, and only format those sourcefiles which have actually changed, or which weren't processed previously.This can save a huge amount of execution time for a project that is formattedrepeatedly over time. There are two methods for keeping history.</p><div class="itemizedlist"><ul type="disc"><li><p><a name="history-file"></a>Use history file</p><a class="indexterm" name="d0e5019"></a><a class="indexterm" name="d0e5024"></a><p>If you can't get along with a history header comment at the top of each sourcefile, but would like historical optimization, the file-based approach may workfor you. The history information of previous formatting will be saved in a file<tt class="filename">history.dat</tt> under the Jalopy settings directory.</p><p>Note that this file will grow over time, especially if one manages several bigprojects. So the history file could become quite huge. As all history entriesare read into memory at startup, it could eat up quite a bit of memory space.Therefore a little history viewer is provided which enables you to selectivelyremove obsolete entries.</p><p>In order to effectively use formatting of a project with several developers it isnice to be able to only format files which have changed. There are three methods ofworking out if a file has changed provided in a drop down. Timestamp will use themodification time of the file, this does not work very well with source controland multiple developers. There are two standard checksums available. Thesework by taking a checksum of the file and comparing it to the one in the history file.If this checksum is different, the file is parsed and formatted in memory and a newchecksum calculated. If the new checksum is different than the checksum for theunformatted file, it is written to disk. This stops files that have just been updatedfrom source control from having being formatted (and timestamps updated).</p><p>Use the <span><b class="guibutton">View...</b></span> button to display the history viewer. Youcan selectively remove entries via the popup menu.</p></li><li><p><a name="history-comment"></a>Use history comments</p><a class="indexterm" name="d0e5044"></a><a class="indexterm" name="d0e5049"></a><a class="indexterm" name="d0e5054"></a><p>Jalopy will insert a small comment in the first line of every source file.The comment encodes the time a file was last formatted along with the packagename of the file. This method is precise and relatively foolproof but does not work wellwith SCM tools.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="misc-backup"></a>4.3.13.3.&nbsp;Backup</h4></div></div><div></div></div><p>For security reasons Jalopy creates a backup copy of the currentlyprocessed file so it can be restored in case a severe error occured during theformatting process. The original file is stored in the backup directory and normallydeleted after the newly formatted file has been successfully written.</p><div class="itemizedlist"><ul type="disc"><li><p>Level</p><p>The backup level defines how many numbered backups should be retained (up to 30).The default is to never hold any backups.</p></li><li><p>Directory</p><p>Specifies where file backups are stored. You should leave this setting untouchedin order to make your code convention portable across different systems and platforms.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="misc-threads"></a>4.3.13.4.&nbsp;Threads</h4></div></div><div></div></div><p>Jalopy, more precisely the provided Plug-ins, are multi-threaded. Onmulti-processor systems the work can be divided onto several processors tospeed up processing.</p><div class="itemizedlist"><ul type="disc"><li><p>Number</p><p>Specifies the number of processing threads to be used. This setting should beequal to the number of processors your system has.</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sorting.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="printer.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="inspector.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.3.12.&nbsp;Sorting&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.4.&nbsp;Code Inspector</td></tr></table></div></td></tr></table></td></tr><tr><td bgcolor="#eeeecc" height="17" style="font-size:9px;padding-left:5px"><a href="#toppage">to top</a></td></tr><tr><td height="30"><br></td></tr><tr><td height="3"></td></tr><tr><td bgcolor="#336699" height="1"></td></tr><tr><td height="1"></td></tr><tr><td bgcolor="#336699" height="16"></td></tr><tr><td bgcolor="#ff9966" height="4"></td></tr><tr><td class="footer" align="center" height="15" valign="middle">            Copyright &copy; 2001-2004, <a class="footer" href="./contact.html">Marco Hunsicker</a>. All rights reserved. Hosted by <a href="http://sourceforge.net">SourceForge.net</a></td></tr></tbody></table><img src="http://sourceforge.net/sflogo.php?group_id=45216&amp;type=1" width="1" height="1" border="0" hspace="0" vspace="0" alt=""></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -