|
|
|
@ -56,6 +56,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected bool useOverrideKeyword = false; |
|
|
|
protected bool useOverrideKeyword = false; |
|
|
|
|
|
|
|
protected bool implementOnlyAbstractMembers = false; |
|
|
|
|
|
|
|
|
|
|
|
void GenerateInterface(IReturnType intf, string fileExtension) |
|
|
|
void GenerateInterface(IReturnType intf, string fileExtension) |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -64,7 +65,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands |
|
|
|
editActionHandler.InsertString("#region " + intf.FullyQualifiedName + " interface implementation\n\t\t");++numOps; |
|
|
|
editActionHandler.InsertString("#region " + intf.FullyQualifiedName + " interface implementation\n\t\t");++numOps; |
|
|
|
|
|
|
|
|
|
|
|
foreach (IProperty property in intf.GetProperties()) { |
|
|
|
foreach (IProperty property in intf.GetProperties()) { |
|
|
|
if (!property.IsAbstract) { |
|
|
|
if (implementOnlyAbstractMembers && !property.IsAbstract) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
string returnType = (fileExtension == ".vb" ? vba : csa).Convert(property.ReturnType); |
|
|
|
string returnType = (fileExtension == ".vb" ? vba : csa).Convert(property.ReturnType); |
|
|
|
@ -137,6 +138,8 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands |
|
|
|
if (fileExtension == ".vb") { |
|
|
|
if (fileExtension == ".vb") { |
|
|
|
editActionHandler.InsertString("\tSet");++numOps; |
|
|
|
editActionHandler.InsertString("\tSet");++numOps; |
|
|
|
Return(); |
|
|
|
Return(); |
|
|
|
|
|
|
|
editActionHandler.InsertString("Throw New NotImplementedException()");++numOps; |
|
|
|
|
|
|
|
Return(); |
|
|
|
editActionHandler.InsertString("\tEnd Set");++numOps; |
|
|
|
editActionHandler.InsertString("\tEnd Set");++numOps; |
|
|
|
Return(); |
|
|
|
Return(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
@ -147,7 +150,8 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands |
|
|
|
Return(); |
|
|
|
Return(); |
|
|
|
editActionHandler.InsertString("{");++numOps; |
|
|
|
editActionHandler.InsertString("{");++numOps; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Return(); |
|
|
|
|
|
|
|
editActionHandler.InsertString("throw new NotImplementedException();");++numOps; |
|
|
|
Return(); |
|
|
|
Return(); |
|
|
|
editActionHandler.InsertString("\t}");++numOps; |
|
|
|
editActionHandler.InsertString("\t}");++numOps; |
|
|
|
Return(); |
|
|
|
Return(); |
|
|
|
@ -168,7 +172,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands |
|
|
|
foreach (IMethod method in intf.GetMethods()) { |
|
|
|
foreach (IMethod method in intf.GetMethods()) { |
|
|
|
string parameters = String.Empty; |
|
|
|
string parameters = String.Empty; |
|
|
|
string returnType = (fileExtension == ".vb" ? vba : csa).Convert(method.ReturnType); |
|
|
|
string returnType = (fileExtension == ".vb" ? vba : csa).Convert(method.ReturnType); |
|
|
|
if (!method.IsAbstract) { |
|
|
|
if (implementOnlyAbstractMembers && !method.IsAbstract) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
for (int j = 0; j < method.Parameters.Count; ++j) { |
|
|
|
for (int j = 0; j < method.Parameters.Count; ++j) { |
|
|
|
|