Resharper's OpenAPI is their API for Resharper plugins. I've not been able to find any documentation other than the XML JetBrains provide in Resharper's bin folder, so this page contains my notes from googling, guessing, and reverse engineering.
For Resharper 3.1 using Visual Studio 2005.
OpenAPI
ActionHandlerAttribute
Assemblies to reference:
- JetBrains.ActionManagement
Used to decorate plugin action handler. Handler ID, given in the attribute constructor, must match the action ID in the plugin's actions XML file.
[ActionHandler("AddMenuItem.SharpTestNannyAction")] internal class SharpTestNannyAction : IActionHandler
ActionsXmlAttribute
Assemblies to reference:
- JetBrains.ActionManagement
Used in plugin's AssemblyInfo.cs file to give reference to the actions XML file.
[assembly: ActionsXml("NoeticTools.SharpTestNanny.Actions.xml", Precompile = false)]
IDataContext
Assemblies to reference:
- JetBrains.ActionManagement
GetData
DataConstants | Useage |
---|---|
CONTEXT_CONTROL | - |
CONTEXT_MENU_PROVIDER | - |
CONTEXT_SCREEN_LOCATION | - |
DATA_PROVIDER | - |
DECLARED_ELEMENT | Same as TYPE_OR_TYPE_MEMBER but to variable level. |
DOCUMENT | Use to edit the current document. |
DOCUMENT_OFFSET | Number of characters from start of document. |
DOCUMENT_SELECTION | - |
EDITOR | - |
POPUP_WINDOW_CONTEXT | - |
PROJECT_MODEL_ELEMENT | Current project file. Typically the current code file. |
PSI_LANGUAGE_TYPE | - |
REFERENCE | - |
REFERENCES | - |
SOLUTION | Current solution. |
SOLUTION_EXPLORER | - |
TEXT_CONTROL | - |
TYPE_OR_TYPE_MEMBER | Gives current class, method, or property name depending on current context. Null if cursor is not in a class or method. |
SearchDescriptor
JetBrains.ReSharper.CodeView.Descriptors.SearchDescriptor
Assemblies to reference:
- JetBrains.ReSharper.CodeView
- JetBrains.ReSharper.TreeModelBrowser
Abstract class used to peform code search. Code example found in FindText project in Resharper's PowerToys example code.
CodeViewUtil
JetBrains.ReSharper.CodeView.Util.CodeViewUtil
Assemblies to reference:
- JetBrains.ReSharper.CodeView
- JetBrains.ReSharper.TreeModelBrowser
IActionHandler
Assemblies to reference:
- JetBrains.ActionManagement
To be implemented by an action handler decorated by ActionHandlerAttribute.
IOccurence
Search results interface. See SearchRequest.
ShowResults
Use to show results of a search.
SearchRequest
Assemblies to reference:
- JetBrains.ReSharper.CodeView
When implemented in derived type, creates search request.
SearchTargets
Property returning collection on search strings. Syntax not understood but "Text \"XYZ\"" appears to search all text for "XYZ". Results are returned in a collection of IOccurence objects.
Best information I've found so far, albiet for Resharper rev 2.5, is [here].
Useful Links
Child pages: