Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once the plugin is launched, you can set the plugin options. You can specify the Java classes to be participated in the code inspection and the severity level of the found probable bugs.

To configure the sample plugin

  1. On the IDEA main menu, choose File | Settings, and then under Project Settings, click Inspections.
  2. In the list of the IntelliJ IDEA inspections, expand the Probable bugs node, and then click '==' or '!=' instead of 'equals()'.
  3. Under Options, you can specify the following plugin settings:
    • From the Severity list, select the severity level of probable bugs the plugin will find (such as Warning, Info, etc.)
    • In the text box under Severity, specify the semicolon separated list of Java classes to be affected by participated in this code inspection.
  4. When finished, click OK.

...

Code Block
return (s1.equals(s2));

Testing the Plugin

The sample plugin contains the TestThisPlugin Java class in the testSource/testPlugin package and the test data in the <plugin directory>/testData directory.
The test program covers two test cases. To perform the plugin test, run the YourTest.test() or YourTest.test1() method.

...