Browse Source

SD2-1161: Refactor icons don't show for VB generic interface declarations in the editor.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1993 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 20 years ago
parent
commit
a0db909e8f
  1. 1902
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
  2. 24
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG

1902
src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs

File diff suppressed because it is too large Load Diff

24
src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG

@ -606,7 +606,10 @@ InterfaceMemberDecl
{ MemberModifier<mod> } { MemberModifier<mod> }
( (
"Event" "Event"
(. mod.Check(Modifiers.VBInterfaceEvents); .) (.
mod.Check(Modifiers.VBInterfaceEvents);
Location startLocation = t.Location;
.)
Identifier (. name = t.val; .) Identifier (. name = t.val; .)
[ "(" [ FormalParameterList<p> ] ")" ] [ "(" [ FormalParameterList<p> ] ")" ]
[ "As" TypeName<out type> ] [ "As" TypeName<out type> ]
@ -614,11 +617,15 @@ InterfaceMemberDecl
(. (.
EventDeclaration ed = new EventDeclaration(type, mod.Modifier, p, attributes, name, null); EventDeclaration ed = new EventDeclaration(type, mod.Modifier, p, attributes, name, null);
compilationUnit.AddChild(ed); compilationUnit.AddChild(ed);
ed.StartLocation = startLocation;
ed.EndLocation = t.EndLocation; ed.EndLocation = t.EndLocation;
.) .)
| |
"Sub" "Sub"
(. mod.Check(Modifiers.VBInterfaceMethods); .) (.
Location startLocation = t.Location;
mod.Check(Modifiers.VBInterfaceMethods);
.)
Identifier (. name = t.val; .) Identifier (. name = t.val; .)
TypeParameterList<templates> TypeParameterList<templates>
[ "(" [ FormalParameterList<p> ] ")" ] [ "(" [ FormalParameterList<p> ] ")" ]
@ -626,13 +633,17 @@ InterfaceMemberDecl
(. (.
MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, null, p, attributes); MethodDeclaration md = new MethodDeclaration(name, mod.Modifier, null, p, attributes);
md.TypeReference = new TypeReference("", "System.Void"); md.TypeReference = new TypeReference("", "System.Void");
md.StartLocation = startLocation;
md.EndLocation = t.EndLocation; md.EndLocation = t.EndLocation;
md.Templates = templates; md.Templates = templates;
compilationUnit.AddChild(md); compilationUnit.AddChild(md);
.) .)
| |
"Function" "Function"
(. mod.Check(Modifiers.VBInterfaceMethods); .) (.
mod.Check(Modifiers.VBInterfaceMethods);
Location startLocation = t.Location;
.)
Identifier (. name = t.val; .) Identifier (. name = t.val; .)
TypeParameterList<templates> TypeParameterList<templates>
[ "(" [ FormalParameterList<p> ] ")" ] [ "(" [ FormalParameterList<p> ] ")" ]
@ -646,6 +657,7 @@ InterfaceMemberDecl
returnTypeAttributeSection.AttributeTarget = "return"; returnTypeAttributeSection.AttributeTarget = "return";
md.Attributes.Add(returnTypeAttributeSection); md.Attributes.Add(returnTypeAttributeSection);
} }
md.StartLocation = startLocation;
md.EndLocation = t.EndLocation; md.EndLocation = t.EndLocation;
md.Templates = templates; md.Templates = templates;
compilationUnit.AddChild(md); compilationUnit.AddChild(md);
@ -653,7 +665,10 @@ InterfaceMemberDecl
EOL EOL
| |
"Property" "Property"
(. mod.Check(Modifiers.VBInterfaceProperties); .) (.
Location startLocation = t.Location;
mod.Check(Modifiers.VBInterfaceProperties);
.)
Identifier (. name = t.val; .) Identifier (. name = t.val; .)
[ "(" [ FormalParameterList<p> ] ")" ] [ "(" [ FormalParameterList<p> ] ")" ]
[ "As" TypeName<out type> ] [ "As" TypeName<out type> ]
@ -667,6 +682,7 @@ InterfaceMemberDecl
PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes); PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes);
pd.Parameters = p; pd.Parameters = p;
pd.EndLocation = t.EndLocation; pd.EndLocation = t.EndLocation;
pd.StartLocation = startLocation;
compilationUnit.AddChild(pd); compilationUnit.AddChild(pd);
.) .)
) )

Loading…
Cancel
Save