How to use the Error Stripe
- The editor uses the error stripe on the right side of it to
show information about interesting places in the code. These places
include, for example:
- The current line
- Errors
- Warnings
- Highlights (like usages of members or method exit points)
- Places where the code has been changed
- ...
The places are represented by small stripes of different colors. How to add import statements for one or more classes
There are several ways to add import statements.
- Use error hints: Click on the error mark with the light bulb or press Alt+Enter. It will offer you a list of possible classes to import. Pick the proper hint and you are done.
- Use the import class dialog: Put the caret into the name of an unimported class and press Alt+Shift+I. A list of possible classes to import will appear.
- Use the smart fix import: Press Ctrl+Shift+I.
You will get a dialog that lists all unresolved identifiers in the
source. If there is more than one option for resolving the identifier
you may choose using the combo box. Classes shown in gray do not fit
for some reason. In the example below the Toolkit class in the com.sun.media.sound package does not have the method getDefaultToolkit(), which is called in the source.
-- Wagner R. Santos |