Browse Source

adopted patch from fidalgo revision 1807

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@88 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 21 years ago
parent
commit
9b103ca09a
  1. 12
      src/Main/Base/Project/Src/TextEditor/Commands/CodeGenerators/InterfaceImplementorCodeGenerator.cs

12
src/Main/Base/Project/Src/TextEditor/Commands/CodeGenerators/InterfaceImplementorCodeGenerator.cs

@ -43,6 +43,11 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -43,6 +43,11 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
foreach (string className in currentClass.BaseTypes) {
IClass baseType = ParserService.CurrentProjectContent.GetClass(className);
if (baseType == null) {
baseType = ParserService.CurrentProjectContent.GetClass(currentClass.Namespace + "." + className);
}
if (baseType == null) {
this.unit = currentClass == null ? null : currentClass.CompilationUnit;
if (unit != null) {
@ -73,8 +78,11 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -73,8 +78,11 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
// search an enqueue all base interfaces
foreach (string interfaceName in intf.BaseTypes) {
IClass baseType = null;
if (unit != null && unit.Usings != null) {
// first look if the interface is in the same namespace
IClass baseType = ParserService.CurrentProjectContent.GetClass(intf.Namespace + "." + interfaceName);
if (baseType == null && unit != null && unit.Usings != null) {
foreach (IUsing u in unit.Usings) {
baseType = u.SearchType(interfaceName);
if (baseType != null) {

Loading…
Cancel
Save