~ubuntu-branches/ubuntu/feisty/monodevelop/feisty

« back to all changes in this revision

Viewing changes to Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-08-18 00:51:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060818005123-5iit07y0j7wjg55f
Tags: 0.11+svn20060818-0ubuntu1
* New SVN snapshot
  + Works with Gtk# 2.9.0
* debian/control:
  + Updated Build-Depends
* debian/patches/use_nunit2.2.dpatch,
  debian/patches/use_real_libs.dpatch:
  + Updated
* debian/patches/versioncontrol_buildfix.dpatch:
  + Fix build failure in the version control addin

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
                        CommandInfoSet ciset = new CommandInfoSet ();
105
105
                        string txt;
106
106
                        
107
 
                        if ((item is IMember && ((IMember)item).Region != null) || (item is IClass && ((IClass)item).Region != null)) {
 
107
                        if (IdeApp.ProjectOperations.CanJumpToDeclaration (item)) {
108
108
                                ciset.CommandInfos.Add (GettextCatalog.GetString ("Go to declaration"), new RefactoryOperation (refactorer.GoToDeclaration));
109
109
                        }
110
110
                        
181
181
                
182
182
                public void GoToDeclaration ()
183
183
                {
184
 
                        if (item is IMember) {
185
 
                                IMember mem = (IMember) item;
186
 
                                if (mem.DeclaringType != null && mem.DeclaringType.Region != null && mem.Region != null)
187
 
                                        IdeApp.Workbench.OpenDocument (mem.DeclaringType.Region.FileName, mem.Region.BeginLine, mem.Region.BeginColumn, true);
188
 
                        } else if (item is IClass) {
189
 
                                IClass cls = (IClass) item;
190
 
                                if (cls.Region != null)
191
 
                                        IdeApp.Workbench.OpenDocument (cls.Region.FileName, cls.Region.BeginLine, cls.Region.BeginColumn, true);
192
 
                        }
 
184
                        IdeApp.ProjectOperations.JumpToDeclaration (item);
193
185
                }
194
186
                
195
187
                public void FindReferences ()
225
217
                        if (cls == null) return;
226
218
                        
227
219
                        if (cls.BaseTypes != null) {
228
 
                                foreach (string bc in cls.BaseTypes) {
229
 
                                        IClass bcls = ctx.GetClass (bc, true, true);
 
220
                                foreach (IReturnType bc in cls.BaseTypes) {
 
221
                                        IClass bcls = ctx.GetClass (bc.FullyQualifiedName, true, true);
230
222
                                        if (bcls != null && bcls.ClassType != ClassType.Interface && bcls.Region != null) {
231
223
                                                IdeApp.Workbench.OpenDocument (bcls.Region.FileName, bcls.Region.BeginLine, bcls.Region.BeginColumn, true);
232
224
                                                return;