Browse Source

Fixed VB output visitor: Named attribute arguments

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@974 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
e23de4ea60
  1. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/IconBarMargin.cs
  2. 1
      src/Libraries/NRefactory/Project/Src/Output/VBNet/VBNetOutputVisitor.cs
  3. 8
      src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs

4
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/IconBarMargin.cs

@ -75,6 +75,10 @@ namespace ICSharpCode.TextEditor @@ -75,6 +75,10 @@ namespace ICSharpCode.TextEditor
int fontHeight = textArea.TextView.FontHeight;
int yPos = lineNumber * fontHeight - textArea.VirtualTop.Y;
if (mousePos.Y >= yPos && mousePos.Y < yPos + fontHeight) {
if (lineNumber == textArea.Document.GetVisibleLine(mark.LineNumber - 1)) {
// marker is inside folded region, it cannot be clicked
continue;
}
mark.Click(textArea, new MouseEventArgs(mouseButtons, 1, mousePos.X, mousePos.Y, 0));
if (oldCount != marks.Count) {
textArea.UpdateLine(lineNumber);

1
src/Libraries/NRefactory/Project/Src/Output/VBNet/VBNetOutputVisitor.cs

@ -230,6 +230,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter @@ -230,6 +230,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
{
outputFormatter.PrintIdentifier(namedArgumentExpression.Name);
outputFormatter.Space();
outputFormatter.PrintToken(Tokens.Colon);
outputFormatter.PrintToken(Tokens.Assign);
outputFormatter.Space();
nodeTracker.TrackedVisit(namedArgumentExpression.Expression, data);

8
src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs

@ -221,6 +221,14 @@ namespace ICSharpCode.NRefactory.Tests.PrettyPrinter @@ -221,6 +221,14 @@ namespace ICSharpCode.NRefactory.Tests.PrettyPrinter
TestTypeMember("Public Function Run() As Boolean Implements SomeInterface.Bla\nEnd Function");
}
[Test]
public void NamedAttributeArgument()
{
TestProgram("<Attribute(ArgName := \"value\")> _\n" +
"Class Test\n" +
"End Class");
}
[Test]
public void Interface()
{

Loading…
Cancel
Save