How to: Add an action the View menu

Hi

ReSharper V3.0.

What do I write in my Actions.xml file to add a action to the View menu in
ReSharper.

Is it something like:

]]>

Thanks
--Jakob

7 comments
Comment actions Permalink

Hello Jakob,

You can find some information here:
http://www.jetbrains.net/confluence/display/ReSharper/Creatingandhandling+actions

View menu has "ReSharper.View" id in version 3.0. In previous versions, it
is not possible to insert action into ReSharper | View menu, due to a conflict
between VS's View menu and ReSharper's View submenu.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


JC> Hi
JC>
JC> ReSharper V3.0.
JC>
JC> What do I write in my Actions.xml file to add a action to the View
JC> menu in ReSharper.
JC>
JC> Is it something like:
JC>
JC> JC> anchor-id="GotoRecentFiles"> JC> JC> JC> JC> Thanks JC>]]> --Jakob


0
Comment actions Permalink

Hello Ilya Ryzhenkov, i use next xml for actions:

When plugin is loaded, i can't find item in menu ReSharper->]]>Refactor. But
when i call "Refactor This" item pressent in popup menu.

P.S. Log file contains following
9:28:35 AM.678: Thread:1: Init DT.ReSharperPlugin.Options.LocalizationOptions
9:28:35 AM.678: Thread:1: Init DT.ReSharperPlugin.Options.Languages.AllLanguagesOptions
9:28:35 AM.678: Thread:1: Init DT.ReSharperPlugin.Options.Languages.CSharpOptions
9:28:35 AM.678: Thread:1: Init DT.ReSharperPlugin.Options.Languages.VBOptions
9:28:35 AM.728: Thread:1: Load actions from assembly 'DT.ReSharperPlugin,
Version=0.9.20.15192, Culture=neutral, PublicKeyToken=null', path='DT.ReSharperPlugin.Actions.xml'
9:28:35 AM.738: Thread:1: EXCEPTION: Value does not fall within the expected
range.
System.ArgumentException: Value does not fall within the expected range.
at EnvDTE.Commands.Item(Object index, Int32 ID)
at JetBrains.VSAddin.ActionManagement.VSActionManager.AddVSCommand(IExecutableAction
action) in c:\Agent\work\Server\ReSharper-Main\Platform\src\JetBrains.VSIntegration\src\ActionManagement\VSActionManager.cs:line
1026

9:28:36 AM.980: Thread:1: EXCEPTION: Value does not fall within the expected
range.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.CommandBars._CommandBars.get_Item(Object Index)
at JetBrains.VSAddin.ActionManagement.VSActionManager.FindVSMenuItem(String
actionId, CommandBar& commandBar, CommandBarButton& commandButton, Int32&
indexInParent) in c:\Agent\work\Server\ReSharper-Main\Platform\src\JetBrains.VSIntegration\src\ActionManagement\VSActionManager.cs:line
249

9:28:37 AM.051: Thread:1: EXCEPTION: Value does not fall within the expected
range.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.CommandBars._CommandBars.get_Item(Object Index)
at JetBrains.VSAddin.ActionManagement.VSActionManager.FindVSMenuItem(String
actionId, CommandBar& commandBar, CommandBarButton& commandButton, Int32&
indexInParent) in c:\Agent\work\Server\ReSharper-Main\Platform\src\JetBrains.VSIntegration\src\ActionManagement\VSActionManager.cs:line
249

9:28:37 AM.081: Thread:1: EXCEPTION: Value does not fall within the expected
range.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.CommandBars._CommandBars.get_Item(Object Index)
at JetBrains.VSAddin.ActionManagement.VSActionManager.FindVSMenuItem(String
actionId, CommandBar& commandBar, CommandBarButton& commandButton, Int32&
indexInParent) in c:\Agent\work\Server\ReSharper-Main\Platform\src\JetBrains.VSIntegration\src\ActionManagement\VSActionManager.cs:line
249

9:28:37 AM.081: Thread:1: EXCEPTION: Value does not fall within the expected
range.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.CommandBars._CommandBars.get_Item(Object Index)
at JetBrains.VSAddin.ActionManagement.VSActionManager.FindVSMenuItem(String
actionId, CommandBar& commandBar, CommandBarButton& commandButton, Int32&
indexInParent) in c:\Agent\work\Server\ReSharper-Main\Platform\src\JetBrains.VSIntegration\src\ActionManagement\VSActionManager.cs:line
249

9:28:37 AM.131: Thread:1: EXCEPTION: Value does not fall within the expected
range.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.CommandBars._CommandBars.get_Item(Object Index)
at JetBrains.VSAddin.ActionManagement.VSActionManager.FindVSMenuItem(String
actionId, CommandBar& commandBar, CommandBarButton& commandButton, Int32&
indexInParent) in c:\Agent\work\Server\ReSharper-Main\Platform\src\JetBrains.VSIntegration\src\ActionManagement\VSActionManager.cs:line
249

9:28:37 AM.161: Thread:1: EXCEPTION: Value does not fall within the expected
range.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.CommandBars._CommandBars.get_Item(Object Index)
at JetBrains.VSAddin.ActionManagement.VSActionManager.FindVSMenuItem(String
actionId, CommandBar& commandBar, CommandBarButton& commandButton, Int32&
indexInParent) in c:\Agent\work\Server\ReSharper-Main\Platform\src\JetBrains.VSIntegration\src\ActionManagement\VSActionManager.cs:line
249


0
Comment actions Permalink

Hello Alexander,

Take a look here:
http://www.jetbrains.net/confluence/display/ReSharper/Deploying+plugin

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

R

  1. 3.0 RC Instraller does not create this value.



0
Comment actions Permalink

Hello Alexander,

the value has been moved under the key:

HKEY_CURRENT_USER\Software\JetBrains\ReSharper\v3.0\vs8.0.

You can delete all the values under that key and check if it helps.


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


R

  1. 3.0 RC Instraller does not create this value.



0
Comment actions Permalink

R

  1. reinits. But my action is available in popup menu "Refactor This" only.



0
Comment actions Permalink

Hello Alexander,

I've investigated it and it appears that unfortunately support for Actions.xml
of 3rd party plugins is broken in 3.0. I've created a request
for it:

http://www.jetbrains.net/jira/browse/RSRP-43536

The fix will go into 3.0.1.

Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


R

  1. reinits. But my action is available in popup menu "Refactor This"

only.



0

Please sign in to leave a comment.