blob: 25e9855c4ad351b93200f6be0d3e2e938a4cfc39 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>
Commenting and uncommenting lines of code
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
</head>
<body>
<h1>
Commenting and uncommenting lines of code
</h1>
To toggle line comments (<code>// comment</code>) in the Java editor:
<ul>
<li>
Select the lines you wish to comment or uncomment, or set the caret into a line
</li>
<li>
Do one of the following:
<ul>
<li>
Press <kbd>Ctrl+/</kbd> or
</li>
<li>
Select <strong>Source &gt; Toggle Comment</strong> from the menu bar
</li>
</ul>
</li>
</ul>
To insert a block comment (<code>/*comment*/</code>) in the Java editor:
<ul>
<li>
Select the text range you wish to comment
</li>
<li>
Do one of the following
<ul>
<li>
Press <kbd>Ctrl+Shift+/</kbd> or
</li>
<li>
Select <strong>Source &gt; Add Block Comment</strong> from the menu bar
</li>
</ul>
</li>
</ul>
To remove a block comment (<code>/*comment*/</code>) in the Java editor:
<ul>
<li>
Select the text range you wish to uncomment or set the caret into a block comment
</li>
<li>
Do one of the following
<ul>
<li>
Press <kbd>Ctrl+Shift+\</kbd> or
</li>
<li>
Select <strong>Source &gt; Remove Block Comment</strong> from the menu bar
</li>
</ul>
</li>
</ul>
<p>
<img src="../images/ngrelc.png" alt="Related concepts" border="0" > <br>
<a href="../concepts/concepts-7.htm">Java editor</a>
</p>
<p>
<img src="../images/ngrelt.png" alt="Related tasks" border="0" ><br>
<a href="tasks-54.htm">Using the Java editor</a><a href="tasks-54.htm"></a>
</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference" border="0" ><br>
<a href="../reference/ref-menu-source.htm">Source menu</a>
</p>
</body>
</html>