R
Rob Richardson
Greetings!
I am trying to write a set of macros to generate Property code for private
variables. With the cursor on a line that says "Private m_MyThing as
Thing", I would run the macro and
Public Property MyThing() As Thing
Get
Return m_MyThing
End Get
Set(ByVal Value As Thing)
m_MyThing = Value
End Set
End Property
would be automatically inserted into my code.
I have a macro that automatically generates a block of code that looks like
the above. The problem is that when it is inserted into my class module,
the statement completion kicks in and I get extra End Get, End Set and End
Property lines.
I would like to have my macro check the Statement Completion setting in my
IDE, remember the current setting, make sure it is off, generate the code,
insert the code, and restore the Statement Completion setting to its
original value. Is there a way to manipulate the Statement Completion
setting inside a macro?
Thanks very much!
Rob
P.S. I will be rewriting the macro to assume Statement Completion is on.
If anybody wants it, I'll be glad to supply it. If there's enough demand,
I'll just post it here.
I am trying to write a set of macros to generate Property code for private
variables. With the cursor on a line that says "Private m_MyThing as
Thing", I would run the macro and
Public Property MyThing() As Thing
Get
Return m_MyThing
End Get
Set(ByVal Value As Thing)
m_MyThing = Value
End Set
End Property
would be automatically inserted into my code.
I have a macro that automatically generates a block of code that looks like
the above. The problem is that when it is inserted into my class module,
the statement completion kicks in and I get extra End Get, End Set and End
Property lines.
I would like to have my macro check the Statement Completion setting in my
IDE, remember the current setting, make sure it is off, generate the code,
insert the code, and restore the Statement Completion setting to its
original value. Is there a way to manipulate the Statement Completion
setting inside a macro?
Thanks very much!
Rob
P.S. I will be rewriting the macro to assume Statement Completion is on.
If anybody wants it, I'll be glad to supply it. If there's enough demand,
I'll just post it here.