diff options
author | Tak <levi@unity3d.com> | 2011-03-03 23:44:56 +0300 |
---|---|---|
committer | Lluis Sanchez <slluis.devel@gmail.com> | 2011-03-04 17:59:25 +0300 |
commit | ae03b7afd91d49a8ccc26c29f5374799f5974dba (patch) | |
tree | 1527ea60c56636ea31a724c42c356f2a8123b65b /main/src/addins/CBinding | |
parent | 381c41f459f26793a39fb2715ad4e75d9a5d2d73 (diff) |
[C] Reuse GotoDeclaration from MD.Refactoring
* CBinding.addin.xml:
* CBinding.csproj:
* Gui/CTextEditorExtension.cs:
* Makefile.am: Reuse GotoDeclaration from MD.Refactoring
License: MIT/X11
Diffstat (limited to 'main/src/addins/CBinding')
-rw-r--r-- | main/src/addins/CBinding/CBinding.addin.xml | 4 | ||||
-rw-r--r-- | main/src/addins/CBinding/CBinding.csproj | 4 | ||||
-rw-r--r-- | main/src/addins/CBinding/Gui/CTextEditorExtension.cs | 5 | ||||
-rw-r--r-- | main/src/addins/CBinding/Makefile.am | 1 |
4 files changed, 10 insertions, 4 deletions
diff --git a/main/src/addins/CBinding/CBinding.addin.xml b/main/src/addins/CBinding/CBinding.addin.xml index 3dd4bb4426..e3e5259f11 100644 --- a/main/src/addins/CBinding/CBinding.addin.xml +++ b/main/src/addins/CBinding/CBinding.addin.xml @@ -15,6 +15,7 @@ <Addin id = "Deployment.Linux" version = "2.6"/> <Addin id = "SourceEditor2" version = "2.6" /> <Addin id = "DesignerSupport" version = "2.6" /> + <Addin id = "Refactoring" version = "2.6" /> </Dependencies> <Extension path = "/MonoDevelop/Core/StockIcons"> @@ -188,7 +189,6 @@ <Command id = "CBinding.CProjectCommands.AddPackage" _label = "Edit Packages..." /> <Command id = "CBinding.CProjectCommands.UpdateClassPad" _label = "Update class pad" icon = "res:update" /> <Command id = "CBinding.CProjectCommands.ShowPackageDetails" _label = "Details..." /> - <Command id = "CBinding.CProjectCommands.GotoDeclaration" _label = "Go to Declaration" /> </Category> </Extension> @@ -269,6 +269,6 @@ </Extension> <Extension path="/MonoDevelop/SourceEditor2/ContextMenu/Editor"> - <CommandItem id = "CBinding.CProjectCommands.GotoDeclaration"/> + <CommandItem id = "MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration" insertafter="MonoDevelop.SourceEditor.SourceEditorCommands.MarkerOperations" /> </Extension> </Addin> diff --git a/main/src/addins/CBinding/CBinding.csproj b/main/src/addins/CBinding/CBinding.csproj index 11e1f378c6..8fef8ffc8a 100644 --- a/main/src/addins/CBinding/CBinding.csproj +++ b/main/src/addins/CBinding/CBinding.csproj @@ -98,6 +98,10 @@ <Name>Mono.TextEditor</Name> <Private>False</Private> </ProjectReference> + <ProjectReference Include="..\MonoDevelop.Refactoring\MonoDevelop.Refactoring.csproj"> + <Project>{100568FC-F4E8-439B-94AD-41D11724E45B}</Project> + <Name>MonoDevelop.Refactoring</Name> + </ProjectReference> </ItemGroup> <ItemGroup> <None Include="Makefile.am" /> diff --git a/main/src/addins/CBinding/Gui/CTextEditorExtension.cs b/main/src/addins/CBinding/Gui/CTextEditorExtension.cs index 124ef630d1..b2d03f87e0 100644 --- a/main/src/addins/CBinding/Gui/CTextEditorExtension.cs +++ b/main/src/addins/CBinding/Gui/CTextEditorExtension.cs @@ -599,7 +599,7 @@ namespace CBinding return accumulator+1; }// ResetTriggerOffset - [CommandHandler (CBinding.CProjectCommands.GotoDeclaration)] + [CommandHandler (MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration)] public void GotoDeclaration () { LanguageItem item = GetLanguageItemAt (Editor.Caret.Location); @@ -607,10 +607,11 @@ namespace CBinding IdeApp.Workbench.OpenDocument ((FilePath)item.File, (int)item.Line, 1, true); } - [CommandUpdateHandler (CBinding.CProjectCommands.GotoDeclaration)] + [CommandUpdateHandler (MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration)] public void CanGotoDeclaration (CommandInfo item) { item.Visible = (GetLanguageItemAt (Editor.Caret.Location) != null); + item.Bypass = !item.Visible; } private LanguageItem GetLanguageItemAt (DocumentLocation location) diff --git a/main/src/addins/CBinding/Makefile.am b/main/src/addins/CBinding/Makefile.am index b16a1bf1ba..325972e584 100644 --- a/main/src/addins/CBinding/Makefile.am +++ b/main/src/addins/CBinding/Makefile.am @@ -6,6 +6,7 @@ DEPS = \ $(top_builddir)/build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll \ $(top_builddir)/build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.Linux.dll \ $(top_builddir)/build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll \ + $(top_builddir)/build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll \ $(top_builddir)/build/AddIns/MonoDevelop.SourceEditor2.dll \ $(top_builddir)/build/bin/Mono.TextEditor.dll \ $(top_builddir)/build/bin/MonoDevelop.Core.dll \ |