[MonoDevelop] [patch] improved CodeGeneration api

Ben Motmans ben.motmans at gmail.com
Tue Oct 9 05:35:06 EDT 2007


Hello,

md_projects.patch (apply inside Core/src/MonoDevelop.Projects)
---------------------------------------------------
* additional IInsertionLocation parameter for the AddMember and
EncapsulateField command
the IInsertionLocation is used to specify where to insert a newly generated
member, the parameter is optional
if null, the default 'old' behavior will be used

* EncapsulateFieldOptions class + parameter for the EncapsulateField method
allows to specify if a getter, setter or both must be generated, and also
specifies the accessibility of the property
(also allows to set the accessibility of the getter and setter individually,
this is not yet supported by the CodeDOM code generation, but it is added
with an eye for the future)

* InsertionLocationCodon
codon to register new InsertionLocations

* IRefactorer changes
string GetPropertyName (RefactorerContext ctx, IClass cls, IField field);
--> method used to allow IRefactorers to override the property name
suggested in the EncapsulateField dialog

int GetCurrentInsertionPosition (IEditableTextFile buffer, IClass cls);
int GetAfterLastFieldInsertionPosition (IEditableTextFile buffer, IClass
cls);
int GetAfterLastEventInsertionPosition (IEditableTextFile buffer, IClass
cls);
int GetAfterLastPropertyInsertionPosition (IEditableTextFile buffer, IClass
cls);
int GetAfterLastMethodInsertionPosition (IEditableTextFile buffer, IClass
cls);
int GetAfterLastConstructorInsertionPosition (IEditableTextFile buffer,
IClass cls);
--> additional methods required to support the default InsertionLocations
(see next item)

* default InsertionLocations
After constructor, After method, After property, After field, Current
Position, After event

md_ide.patch (apply inside Core/src/MonoDevelop.Ide)
---------------------------------------------------
small changes in the EncapsulateField dialog to make use of the updated API

Are the changes ok to commit ?
(changelogs are not yet added in the patch, as usual, i'll include them if
the changes are approved)

-- Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20071009/fe3f55a3/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: md_ide.patch
Type: text/x-patch
Size: 2358 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20071009/fe3f55a3/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: md_projects.patch
Type: text/x-patch
Size: 40559 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20071009/fe3f55a3/attachment-0003.bin 


More information about the Monodevelop-list mailing list