Parse class definitions

  • Thread starter Thread starter Pete Kane
  • Start date Start date
P

Pete Kane

Hi All, I currently have all of the common .NET control classes defined
in one ( getting bigger by the day ) file and am thinking of separating
them into individual .cs's - does anyone know of a tool on the market
that does this ? has anyone here written such a thing ?
 
01: Click the [-] at the top of the class definition
02: When it collapses select the single collapsed line
03: CTRL+X
04: Paste it into a new file.

Shouldn't take long.
 
Peter said:
01: Click the [-] at the top of the class definition
02: When it collapses select the single collapsed line
03: CTRL+X
04: Paste it into a new file.

Shouldn't take long.
Hi Peter, that's what I'll probably end up doing - just thought I'd ask
if anyone had some code...
 
Pete Kane said:
Hi All, I currently have all of the common .NET control classes defined in
one ( getting bigger by the day ) file and am thinking of separating them
into individual .cs's - does anyone know of a tool on the market that does
this ? has anyone here written such a thing ?

If you had the time, you could write one yourself using the code DOM (look
up the EnvDTE namespace for help with that in macro's and more specifically,
the keyword FileCodeModel in C#). It would take more time to write an
add-in that does this, but hey, once done, you can offer it to the rest of
the community so they could make use of it too.

Mythran
 
Back
Top