diff options
author | Jochen Wezel <jochen@mono-cvs.ximian.com> | 2004-06-03 17:34:50 +0400 |
---|---|---|
committer | Jochen Wezel <jochen@mono-cvs.ximian.com> | 2004-06-03 17:34:50 +0400 |
commit | 75adf4a235e19ada3c2991bbf879f2caaa59cfac (patch) | |
tree | 36ff2e0a755db142f28d3ca59779c070395b2814 /mcs/class/System/Microsoft.VisualBasic | |
parent | d395910e3f681fa375e880e034759c5d64b86585 (diff) |
Fixes for Property ReadOnly/WriteOnly, Property Set
svn path=/trunk/mcs/; revision=28766
Diffstat (limited to 'mcs/class/System/Microsoft.VisualBasic')
-rw-r--r-- | mcs/class/System/Microsoft.VisualBasic/ChangeLog | 7 | ||||
-rw-r--r-- | mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs | 22 |
2 files changed, 25 insertions, 4 deletions
diff --git a/mcs/class/System/Microsoft.VisualBasic/ChangeLog b/mcs/class/System/Microsoft.VisualBasic/ChangeLog index b0a22816503..2ed8192b717 100644 --- a/mcs/class/System/Microsoft.VisualBasic/ChangeLog +++ b/mcs/class/System/Microsoft.VisualBasic/ChangeLog @@ -1,3 +1,10 @@ +2004-06-03 Jochen Wezel <jwezel@compumaster.de> + + * VBCodeGenerator.cs: MemberAttributes made more compatible to MS + style (e. g. NotOverridable), Properties ReadOnly/WriteOnly fixed, + Property Set fixed, successless analysis of wrong indentation of last + line which contains "End Namespace" (should be on the very left) + 2004-04-26 Jochen Wezel <jwezel@compumaster.de> * VBCodeGenerator.cs: GenerateAttributeDeclarationsEnd: Fix of line break diff --git a/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs b/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs index a84ae44b825..f4d8e0baec3 100644 --- a/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs +++ b/mcs/class/System/Microsoft.VisualBasic/VBCodeGenerator.cs @@ -641,10 +641,10 @@ namespace Microsoft.VisualBasic OutputMemberAccessModifier (attributes);
OutputMemberScopeModifier (attributes);
- if (property.HasGet && (property.HasSet = false))
+ if (property.HasGet && (!property.HasSet))
output.Write ("ReadOnly " );
- if (property.HasSet && (property.HasGet = false))
+ if (property.HasSet && (!property.HasGet))
output.Write ("WriteOnly " );
output.Write ("Property " );
@@ -664,7 +664,9 @@ namespace Microsoft.VisualBasic }
if (property.HasSet) {
- output.WriteLine ("Set");
+ output.Write ("Set (");
+ OutputTypeNamePair (property.Type, "Value"); + output.WriteLine (")"); ++Indent;
GenerateStatements (property.SetStatements);
@@ -805,8 +807,11 @@ namespace Microsoft.VisualBasic {
string name = ns.Name;
if (name != null && name != string.Empty) {
+ Output.WriteLine ("'Why is the indentation not working correctly here? --> see in mcs/class/System/Micrisoft.VisualBasic/VBCodeGenerator.cs"); + Output.WriteLine ("'Indent=" + Indent.ToString()); --Indent;
Output.WriteLine ("End Namespace");
+ Output.WriteLine ("'Indent=" + Indent.ToString()); }
}
@@ -893,7 +898,8 @@ namespace Microsoft.VisualBasic Output.Write ("MustOverride ");
break;
case MemberAttributes.Final:
- Output.Write ("NotOverridable ");
+ //JW 2004-06-03: seems to be the "sealed" keyword in C# and the "NotOverridable" keyword in VB, but conflicts with ASP.NET generation + //Output.Write ("NotOverridable ");
break;
case MemberAttributes.Static:
Output.Write ("Shared ");
@@ -901,6 +907,14 @@ namespace Microsoft.VisualBasic case MemberAttributes.Override:
Output.Write ("Overrides ");
break;
+ case MemberAttributes.Overloaded: + // based on http://gendotnet.com/Code%20Gen%20Articles/codedom.htm + Output.Write ("Overloads "); + MemberAttributes access_ovl = attributes & MemberAttributes.AccessMask; + if ( access_ovl == MemberAttributes.Public || + access_ovl == MemberAttributes.Family ) + Output.Write ("Overridable "); + break; default:
//
// FUNNY! if the scope value is
|