Skip to content

Commit 4503e41

Browse files
committed
Merge branch 'next' into PortToCastleWindsor
Merging last minute changes.
2 parents 5c16fa1 + 7ffd582 commit 4503e41

File tree

6 files changed

+123
-5
lines changed

6 files changed

+123
-5
lines changed

RetailCoder.VBE/UI/RubberduckUI.de.resx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,4 +2050,18 @@ Möchten sie die Einstellungen in Rubberduck importieren?</value>
20502050
<data name="RubberduckMenu_Refresh">
20512051
<value>Aktualisieren</value>
20522052
</data>
2053+
<data name="ToDoExplorer_CopyToolTip">
2054+
<value>In die Zwischenablage kopieren</value>
2055+
</data>
2056+
<data name="ToDoExplorer_NumberOfIssuesFound_Plural">
2057+
<value>Rubberduck TODO Markierungen - {0}
2058+
{1} Markierungen gefunden.</value>
2059+
</data>
2060+
<data name="ToDoExplorerToDoItemFormat">
2061+
<value>{0}: {1} - {2}.{3} Zeile {4}.</value>
2062+
</data>
2063+
<data name="ToDoExplorer_NumberOfIssuesFound_Singular">
2064+
<value>Rubberduck TODO Markierungen - {0}
2065+
{1} Markierungen gefunden.</value>
2066+
</data>
20532067
</root>

RetailCoder.VBE/UI/RubberduckUI.fr.resx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,4 +2053,18 @@ les projets dans le VBE.</value>
20532053
<data name="Preview">
20542054
<value>Aperçu</value>
20552055
</data>
2056+
<data name="ToDoExplorer_CopyToolTip">
2057+
<value>Copier dans le presse-papier</value>
2058+
</data>
2059+
<data name="ToDoExplorer_NumberOfIssuesFound_Plural">
2060+
<value>Rubberduck - {0}
2061+
{1} marqueurs TODO trouvés.</value>
2062+
</data>
2063+
<data name="ToDoExplorerToDoItemFormat">
2064+
<value>{0}: {1} - {2}.{3} ligne {4}.</value>
2065+
</data>
2066+
<data name="ToDoExplorer_NumberOfIssuesFound_Singular">
2067+
<value>Rubberduck marqueurs TODO - {0}
2068+
{1} marqueurs trouvés.</value>
2069+
</data>
20562070
</root>

RetailCoder.VBE/UI/RubberduckUI.resx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<root>
33
<!--
44
Microsoft ResX Schema
@@ -59,7 +59,7 @@
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->
62-
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
6363
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
6464
<xsd:element name="root" msdata:IsDataSet="true">
6565
<xsd:complexType>
@@ -2107,12 +2107,12 @@ Would you like to import them to Rubberduck?</value>
21072107
<value>Refresh</value>
21082108
</data>
21092109
<data name="ToDoExplorer_NumberOfIssuesFound_Plural" xml:space="preserve">
2110-
<value>Rubberduck ToDo Items - {0}
2110+
<value>Rubberduck TODO Items - {0}
21112111
{1} items found.</value>
21122112
<comment>{0}=timestamp; {1}=number</comment>
21132113
</data>
21142114
<data name="ToDoExplorer_NumberOfIssuesFound_Singular" xml:space="preserve">
2115-
<value>Rubberduck ToDo Items - {0}
2115+
<value>Rubberduck TODO Items - {0}
21162116
{1} items found.</value>
21172117
<comment>{0}=timestamp; {1}=number</comment>
21182118
</data>
@@ -2122,4 +2122,4 @@ Would you like to import them to Rubberduck?</value>
21222122
<data name="ToDoExplorer_CopyToolTip" xml:space="preserve">
21232123
<value>Copy to clipboard</value>
21242124
</data>
2125-
</root>
2125+
</root>

Rubberduck.Parsing/Grammar/PartialExtensions/VBAParserPartialExtensions.cs

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,78 @@ public void AddAttributes(Attributes attributes)
424424
#endregion
425425
}
426426

427+
public partial class UdtDeclarationContext : IIdentifierContext, IAnnotatedContext
428+
{
429+
#region IIdentifierContext
430+
public Interval IdentifierTokens
431+
{
432+
get
433+
{
434+
Interval tokenInterval;
435+
Identifier.GetName(this, out tokenInterval);
436+
return tokenInterval;
437+
}
438+
}
439+
#endregion
440+
441+
#region IAnnotatedContext
442+
public Attributes Attributes { get; } = new Attributes();
443+
public int AttributeTokenIndex => Start.TokenIndex - 1;
444+
445+
private readonly List<AnnotationContext> _annotations = new List<AnnotationContext>();
446+
public IEnumerable<AnnotationContext> Annotations => _annotations;
447+
448+
public void Annotate(AnnotationContext annotation)
449+
{
450+
_annotations.Add(annotation);
451+
}
452+
453+
public void AddAttributes(Attributes attributes)
454+
{
455+
foreach (var attribute in attributes)
456+
{
457+
Attributes.Add(new AttributeNode(attribute.Name, attribute.Values));
458+
}
459+
}
460+
#endregion
461+
}
462+
463+
public partial class UdtMemberContext : IIdentifierContext, IAnnotatedContext
464+
{
465+
#region IIdentifierContext
466+
public Interval IdentifierTokens
467+
{
468+
get
469+
{
470+
Interval tokenInterval;
471+
Identifier.GetName(this, out tokenInterval);
472+
return tokenInterval;
473+
}
474+
}
475+
#endregion
476+
477+
#region IAnnotatedContext
478+
public Attributes Attributes { get; } = new Attributes();
479+
public int AttributeTokenIndex => Start.TokenIndex - 1;
480+
481+
private readonly List<AnnotationContext> _annotations = new List<AnnotationContext>();
482+
public IEnumerable<AnnotationContext> Annotations => _annotations;
483+
484+
public void Annotate(AnnotationContext annotation)
485+
{
486+
_annotations.Add(annotation);
487+
}
488+
489+
public void AddAttributes(Attributes attributes)
490+
{
491+
foreach (var attribute in attributes)
492+
{
493+
Attributes.Add(new AttributeNode(attribute.Name, attribute.Values));
494+
}
495+
}
496+
#endregion
497+
}
498+
427499
public partial class IdentifierStatementLabelContext : IIdentifierContext, IAnnotatedContext
428500
{
429501
#region IIdentifierContext

Rubberduck.Parsing/Symbols/Identifier.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,23 @@ public static string GetName(VBAParser.EnumerationStmtContext context)
120120
return GetName(context.identifier());
121121
}
122122

123+
public static string GetName(VBAParser.UdtDeclarationContext context, out Interval tokenInterval)
124+
{
125+
return GetName(context.untypedIdentifier(), out tokenInterval);
126+
}
127+
128+
public static string GetName(VBAParser.UdtMemberContext context, out Interval tokenInterval)
129+
{
130+
var untypedIdentifier = context.untypedNameMemberDeclaration()?.untypedIdentifier();
131+
if (untypedIdentifier != null)
132+
{
133+
return GetName(untypedIdentifier, out tokenInterval);
134+
}
135+
136+
var unrestrictedIdentifier = context.reservedNameMemberDeclaration().unrestrictedIdentifier();
137+
return GetName(unrestrictedIdentifier, out tokenInterval);
138+
}
139+
123140
public static string GetName(VBAParser.EnumerationStmt_ConstantContext context, out Interval tokenInterval)
124141
{
125142
var nameContext = context.identifier();

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ for:
33
-
44
branches:
55
only:
6+
- master
67
- next
78
version: 2.1.0.{build}
89
after_test:

0 commit comments

Comments
 (0)