This example uses Statement Completion's Parameter Info feature to display information for a method's argument.
Note If you have completed the steps of Creating Statements with Word Completion, Selecting an Overloaded Method, and Selecting Methods from a Member List, continue with the following procedure. If not, take a few minutes and work through those procedures before selecting a method for the String
class.
Before proceeding, make sure you have loaded a .java file into the Text editor that contains the following code:
String myStr = new String("Hello World!");
if(myStr.equalsIgnoreCase
To select build an argument list with Parameter Info
if
statement, type an opening parenthesis, "(
", immediately after "myStr.equalsIgnoreCase
".Parameter Info displays the method's declaration with the single parameter (String p1) in a bold-type font.
Note In this case, the method has only one parameter (String p1). If you select a method that takes more than one argument, IntelliSense displays argument types and positions within the method declaration. When you type the opening parenthesis after the method's name, IntelliSense bolds the first argument. As you add commas between the arguments, IntelliSense bolds the type and position information for the next argument that's needed to complete the method's call.
Tip If you do not get a pop-up window with parameter information after you type the opening parenthesis, select Parameter Info from the Edit menu or use the keyboard shortcut, CTRL+SHIFT+I. If this continues to happen, make sure you've enabled the Statement Completion feature.
"hello world!"))
The completed if
statement should look like the following:
if(myStr.equalsIgnoreCase("hello world!"))
if
statement: {
System.out.println("The strings are the same.");
}
else
{
System.out.println("The strings are different.");
}
return;
return
" (the last statement of this program's code). Click the right mouse button and select Run To Cursor from the shortcut menu.The strings are the same.