Hi!
Thanks again for the patch. Some comments:
* MoveClassToFile in RefactoryCommands.cs removes the
source file
from the project and adds it again. Why so?
* Also, why close the active file?
* When calling GettextCatalog.GetString, you have to
use the
literal string as parameter, you can't use a
variable. That's
because the string scanner in charge of collecting
translatable
strings looks at the parameter of GetString calls.
* Use MessageService.Confirm to ask the user for
confirmation.
* Formatting issues: please always use spaces to
separate
assignments operands. E.g. "a = b", not
"a=b" or "a= b". The
same for == and !=. Add a space between the method
name and the
parameter list. E.g. "run (a)", not
"run(a)". Also add one space
between parameters. In general, use of spaces is
very
inconsistent, please read
http:/
/www.mono-project.com/Coding_Guidelines.
* Never throw NullReferenceException directly. If you
want to
throw and exception when a parameter is null, that's
what
System.ArgumentNullException is for.
* Use intrinsic type names when referring primitive
types: e.g.
"int" instead of "Int32",
"string" instead of "String".
* The command should ask the name of the new file to
the user. It
can suggest the class name as file name by default,
but the user
should be able to choose.
* If the new file already exist, It has to ask for
confirmation
before overwriting.
* in GenerateCSharpUsings, you should take into
account alias
definitions, e.g. using MyType = SomeType;
* In CodeGenerator.MoveTypeToFile (CSharpBinding),
instead of
rewriting the source file, you can use the
IEditableTextFile
object you have to modify it, and call .Save when
you are done.
What's useful about it, is that if the file is open
in the
editor, the changes will be directly made in the
open editor.
Lluis.
El ds 15 de 03 del 2008 a les 09:55 -0700, en/na Ploscariu
Simion va
escriure:
> Hi i sended some patches in december and the only
feedback i recived
> was about using tabs and that you are busy with the
release. I adapted
> the patches to the curent monodevelop version(some
problem appeared
> when i tried to display a YES/No dialog some changes
had taken place
> and i do not understend how MD uses this dialogs, it
all be placed in
> a static class accesible from anywhere)
>
> My patches implement a task from TODO on MD web site: a
method of
> moving a class to a separate file.
> Thx for help to lluis and the other guys from
#monodevelop and please
> give me feedback(if you can use this patches that will
add a entry in
> the menu when you right click a class/struct name in c#
files,near
> rename entry) If i did some mistakes or naive things
just tell and
> explain me and i will try to fix this. And if is a good
patch then i
> will try to umplement other small task from TODO list.
>
> P.S i hope that you can download the attachement and
excuse my bad
> english
>
>
>
>
____________________________________________________________
__________
> Be a better friend, newshound, and know-it-all with
Yahoo! Mobile. Try
> it now.
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
_______________________________________________
Monodevelop-list mailing list
Monodevelop-list lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
|