Creating option pages

Skip to end of metadata
Go to start of metadata

Options system

In ReSharper, options are centralized in a single modal dialog, displaying option pages. Option pages are organized in a tree using same technique as in action system - specifying parent and anchoring point. In order to create option page one has to create UserControl, attach OptionsPage attribute and implement IOptionsPage interface. Constructor of the options page should receive single parameter of IOptionsUI type:

Example of simple option page

Below is simple options page without .Designer.cs parts. Attribute specifies attributes and position in options tree. IOptionsUI parameter is not used here, see Cyclomatic Complexity power toy for example of its use.

References

JetBrains.ReSharper.IDECore.dll – provides constants and types specific to ReSharper environment
JetBrains.ReSharper.Util.dll – contains utility classes used throughout the project

Samples and power toys

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.