5 comments
Comment actions Permalink

Here it is.
http://www.intellij.net/forums/thread.jsp?nav=false&forum=35&thread=205919&start=0&msRange=15

"Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in message
news:c8a894d912be148c817eb902224c6@news.intellij.net...

Please submit a request to the tracker describing the problem.

>

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>> Hello Shimon,
>>
>> there's no way for doing this - even if we provided an API in
>> ReSharper for
>> ignoring text
>> change events, you'd have difficulty using it because macros and
>> add-ins
>> run in different address
>> spaces (the former run in a dedicated process, while the latter run
>> inside
>> devenv.exe). I think we should
>> investigate why ReSharper causes such a slow down for a text changing
>> macro.
>> Regards,
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> Macro is simply printing out some text. But it is doing very slow if
>>> R# is
>>> on. I think it is because R# is trying to work with the text the same
>>> time
>>> as macro writing it.
>>> I tried to check add in name and see if it is R# and work with it.
>>> But
>>> Add
>>> in has very little functionality. It allows to load/unload but
>>> doesn't
>>> allow
>>> any add in specific functionality. I just need to tell R#  please
>>> don't do
>>> anything till macro is finished and AddIn class doesn't allow it.
>>> I hope that I am clear.
>>> Shimon.
>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>> message
>>> news:c8a894d912b86f8c817ba4008556d@news.intellij.net...
>>>> Hello Shimon,
>>>>
>>>> why do you need "to get from AddIn to ReSharper itself"? You only
>>>> need to
>>>> check the add-in
>>>> name, and if it is ReSharper, proceed with it. Could you please tell
>>>> us
>>>> more about what your
>>>> macro is doing, or even better, send us a sample code?
>>>> Regards,
>>>> Dmitry Shaporenkov
>>>> JetBrains, Inc
>>>> http://www.jetbrains.com
>>>> "Develop with pleasure!"
>>>>> I looked into it a little more since it effects me a lot.
>>>>> AddIn API allow to connect/disconnect plug in that takes a lot of
>>>>> time
>>>>> by
>>>>> itself and is not justified in macros.
>>>>> I couldn't figure out how to get from AddIn to ReSharper itself.
>>>>> And also even if it possible to do you have anything that would
>>>>> just
>>>>> disable
>>>>> text parsing for the time of running macros.
>>>>> Thank you,
>>>>> Shimon.
>>>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>>>> message
>>>>> news:c8a894d9116e298c80c4a288fd3a7@news.intellij.net...
>>>>>> Hello Shimon,
>>>>>>
>>>>>> AFAIK add-in enabling/disabling is accessible via VS API. I'm not
>>>>>> sure,
>>>>>> however, that it can be called
>>>>>> from a macro. You can check the EnvDTE.DTE.AddIns and EnvDTE.AddIn
>>>>>> API.
>>>>>> Regards,
>>>>>> Dmitry Shaporenkov
>>>>>> JetBrains, Inc
>>>>>> http://www.jetbrains.com
>>>>>> "Develop with pleasure!"
>>>>>>>
>>>>>>> I already asked it once just wanted to know if it is something
>>>>>>> you
>>>>>>> are
>>>>>>> dealing with.
>>>>>>> Running macros that print some text to code window is very slow.
>>>>>>> Is there a way to disable enable R# through macros?
>>>>>>> Thanks
>>>>>>> Shimon
>



0
Comment actions Permalink

I think I found work around for this. use selection.Insert() instead of
selection.Text =
I posted it to tracker.
The work around has slight draw back - I need to reformat the file but it is
minor with R#.

Thanks.

"Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in message
news:c8a894d912be148c817eb902224c6@news.intellij.net...

Please submit a request to the tracker describing the problem.

>

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>> Hello Shimon,
>>
>> there's no way for doing this - even if we provided an API in
>> ReSharper for
>> ignoring text
>> change events, you'd have difficulty using it because macros and
>> add-ins
>> run in different address
>> spaces (the former run in a dedicated process, while the latter run
>> inside
>> devenv.exe). I think we should
>> investigate why ReSharper causes such a slow down for a text changing
>> macro.
>> Regards,
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> Macro is simply printing out some text. But it is doing very slow if
>>> R# is
>>> on. I think it is because R# is trying to work with the text the same
>>> time
>>> as macro writing it.
>>> I tried to check add in name and see if it is R# and work with it.
>>> But
>>> Add
>>> in has very little functionality. It allows to load/unload but
>>> doesn't
>>> allow
>>> any add in specific functionality. I just need to tell R# please
>>> don't do
>>> anything till macro is finished and AddIn class doesn't allow it.
>>> I hope that I am clear.
>>> Shimon.
>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>> message
>>> news:c8a894d912b86f8c817ba4008556d@news.intellij.net...
>>>> Hello Shimon,
>>>>
>>>> why do you need "to get from AddIn to ReSharper itself"? You only
>>>> need to
>>>> check the add-in
>>>> name, and if it is ReSharper, proceed with it. Could you please tell
>>>> us
>>>> more about what your
>>>> macro is doing, or even better, send us a sample code?
>>>> Regards,
>>>> Dmitry Shaporenkov
>>>> JetBrains, Inc
>>>> http://www.jetbrains.com
>>>> "Develop with pleasure!"
>>>>> I looked into it a little more since it effects me a lot.
>>>>> AddIn API allow to connect/disconnect plug in that takes a lot of
>>>>> time
>>>>> by
>>>>> itself and is not justified in macros.
>>>>> I couldn't figure out how to get from AddIn to ReSharper itself.
>>>>> And also even if it possible to do you have anything that would
>>>>> just
>>>>> disable
>>>>> text parsing for the time of running macros.
>>>>> Thank you,
>>>>> Shimon.
>>>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>>>> message
>>>>> news:c8a894d9116e298c80c4a288fd3a7@news.intellij.net...
>>>>>> Hello Shimon,
>>>>>>
>>>>>> AFAIK add-in enabling/disabling is accessible via VS API. I'm not
>>>>>> sure,
>>>>>> however, that it can be called
>>>>>> from a macro. You can check the EnvDTE.DTE.AddIns and EnvDTE.AddIn
>>>>>> API.
>>>>>> Regards,
>>>>>> Dmitry Shaporenkov
>>>>>> JetBrains, Inc
>>>>>> http://www.jetbrains.com
>>>>>> "Develop with pleasure!"
>>>>>>>
>>>>>>> I already asked it once just wanted to know if it is something
>>>>>>> you
>>>>>>> are
>>>>>>> dealing with.
>>>>>>> Running macros that print some text to code window is very slow.
>>>>>>> Is there a way to disable enable R# through macros?
>>>>>>> Thanks
>>>>>>> Shimon
>



0
Comment actions Permalink

Hello Shimon,

it's odd that there is such a difference between those two methods for modifying
text. I suspect the problem
is that when you use selection.Text and VS reformats text (I don't know why
it doesn't in case of selection.Insert), ReSharper receives a huge amount
of small text change notifications (whitespace insertions/deletions) which
take a long time to process. We'll take a look at this.


Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I think I found work around for this. use selection.Insert() instead
of
selection.Text =
I posted it to tracker.
The work around has slight draw back - I need to reformat the file but
it is
minor with R#.
Thanks.

"Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in message
news:c8a894d912be148c817eb902224c6@news.intellij.net...

>> Please submit a request to the tracker describing the problem.
>>
>> Regards,
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> Hello Shimon,
>>>
>>> there's no way for doing this - even if we provided an API in
>>> ReSharper for
>>> ignoring text
>>> change events, you'd have difficulty using it because macros and
>>> add-ins
>>> run in different address
>>> spaces (the former run in a dedicated process, while the latter run
>>> inside
>>> devenv.exe). I think we should
>>> investigate why ReSharper causes such a slow down for a text
>>> changing
>>> macro.
>>> Regards,
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>> Macro is simply printing out some text. But it is doing very slow
>>>> if
>>>> R# is
>>>> on. I think it is because R# is trying to work with the text the
>>>> same
>>>> time
>>>> as macro writing it.
>>>> I tried to check add in name and see if it is R# and work with it.
>>>> But
>>>> Add
>>>> in has very little functionality. It allows to load/unload but
>>>> doesn't
>>>> allow
>>>> any add in specific functionality. I just need to tell R# please
>>>> don't do
>>>> anything till macro is finished and AddIn class doesn't allow it.
>>>> I hope that I am clear.
>>>> Shimon.
>>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>>> message
>>>> news:c8a894d912b86f8c817ba4008556d@news.intellij.net...
>>>>> Hello Shimon,
>>>>>
>>>>> why do you need "to get from AddIn to ReSharper itself"? You only
>>>>> need to
>>>>> check the add-in
>>>>> name, and if it is ReSharper, proceed with it. Could you please
>>>>> tell
>>>>> us
>>>>> more about what your
>>>>> macro is doing, or even better, send us a sample code?
>>>>> Regards,
>>>>> Dmitry Shaporenkov
>>>>> JetBrains, Inc
>>>>> http://www.jetbrains.com
>>>>> "Develop with pleasure!"
>>>>>> I looked into it a little more since it effects me a lot.
>>>>>> AddIn API allow to connect/disconnect plug in that takes a lot of
>>>>>> time
>>>>>> by
>>>>>> itself and is not justified in macros.
>>>>>> I couldn't figure out how to get from AddIn to ReSharper itself.
>>>>>> And also even if it possible to do you have anything that would
>>>>>> just
>>>>>> disable
>>>>>> text parsing for the time of running macros.
>>>>>> Thank you,
>>>>>> Shimon.
>>>>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>>>>> message
>>>>>> news:c8a894d9116e298c80c4a288fd3a7@news.intellij.net...
>>>>>>> Hello Shimon,
>>>>>>>
>>>>>>> AFAIK add-in enabling/disabling is accessible via VS API. I'm
>>>>>>> not
>>>>>>> sure,
>>>>>>> however, that it can be called
>>>>>>> from a macro. You can check the EnvDTE.DTE.AddIns and
>>>>>>> EnvDTE.AddIn
>>>>>>> API.
>>>>>>> Regards,
>>>>>>> Dmitry Shaporenkov
>>>>>>> JetBrains, Inc
>>>>>>> http://www.jetbrains.com
>>>>>>> "Develop with pleasure!"
>>>>>>>>
>>>>>>>> I already asked it once just wanted to know if it is something
>>>>>>>> you
>>>>>>>> are
>>>>>>>> dealing with.
>>>>>>>> Running macros that print some text to code window is very
>>>>>>>> slow.
>>>>>>>> Is there a way to disable enable R# through macros?
>>>>>>>> Thanks
>>>>>>>> Shimon


0
Comment actions Permalink

Well, I've read your comment to the request and it's funny that we've come
to the
same conclusion :)

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello Shimon,

it's odd that there is such a difference between those two methods for
modifying
text. I suspect the problem
is that when you use selection.Text and VS reformats text (I don't
know why
it doesn't in case of selection.Insert), ReSharper receives a huge
amount
of small text change notifications (whitespace insertions/deletions)
which
take a long time to process. We'll take a look at this.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>> I think I found work around for this. use selection.Insert() instead
>> of
>> selection.Text =
>> I posted it to tracker.
>> The work around has slight draw back - I need to reformat the file
>> but
>> it is
>> minor with R#.
>> Thanks.
>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>> message news:c8a894d912be148c817eb902224c6@news.intellij.net...
>>
>>> Please submit a request to the tracker describing the problem.
>>>
>>> Regards,
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>> Hello Shimon,
>>>>
>>>> there's no way for doing this - even if we provided an API in
>>>> ReSharper for
>>>> ignoring text
>>>> change events, you'd have difficulty using it because macros and
>>>> add-ins
>>>> run in different address
>>>> spaces (the former run in a dedicated process, while the latter run
>>>> inside
>>>> devenv.exe). I think we should
>>>> investigate why ReSharper causes such a slow down for a text
>>>> changing
>>>> macro.
>>>> Regards,
>>>> Dmitry Shaporenkov
>>>> JetBrains, Inc
>>>> http://www.jetbrains.com
>>>> "Develop with pleasure!"
>>>>> Macro is simply printing out some text. But it is doing very slow
>>>>> if
>>>>> R# is
>>>>> on. I think it is because R# is trying to work with the text the
>>>>> same
>>>>> time
>>>>> as macro writing it.
>>>>> I tried to check add in name and see if it is R# and work with it.
>>>>> But
>>>>> Add
>>>>> in has very little functionality. It allows to load/unload but
>>>>> doesn't
>>>>> allow
>>>>> any add in specific functionality. I just need to tell R# please
>>>>> don't do
>>>>> anything till macro is finished and AddIn class doesn't allow it.
>>>>> I hope that I am clear.
>>>>> Shimon.
>>>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>>>> message
>>>>> news:c8a894d912b86f8c817ba4008556d@news.intellij.net...
>>>>>> Hello Shimon,
>>>>>>
>>>>>> why do you need "to get from AddIn to ReSharper itself"? You only
>>>>>> need to
>>>>>> check the add-in
>>>>>> name, and if it is ReSharper, proceed with it. Could you please
>>>>>> tell
>>>>>> us
>>>>>> more about what your
>>>>>> macro is doing, or even better, send us a sample code?
>>>>>> Regards,
>>>>>> Dmitry Shaporenkov
>>>>>> JetBrains, Inc
>>>>>> http://www.jetbrains.com
>>>>>> "Develop with pleasure!"
>>>>>>> I looked into it a little more since it effects me a lot.
>>>>>>> AddIn API allow to connect/disconnect plug in that takes a lot
>>>>>>> of
>>>>>>> time
>>>>>>> by
>>>>>>> itself and is not justified in macros.
>>>>>>> I couldn't figure out how to get from AddIn to ReSharper itself.
>>>>>>> And also even if it possible to do you have anything that would
>>>>>>> just
>>>>>>> disable
>>>>>>> text parsing for the time of running macros.
>>>>>>> Thank you,
>>>>>>> Shimon.
>>>>>>> "Dmitry Shaporenkov (JetBrains)" <dsha@jetbrains.com> wrote in
>>>>>>> message
>>>>>>> news:c8a894d9116e298c80c4a288fd3a7@news.intellij.net...
>>>>>>>> Hello Shimon,
>>>>>>>>
>>>>>>>> AFAIK add-in enabling/disabling is accessible via VS API. I'm
>>>>>>>> not
>>>>>>>> sure,
>>>>>>>> however, that it can be called
>>>>>>>> from a macro. You can check the EnvDTE.DTE.AddIns and
>>>>>>>> EnvDTE.AddIn
>>>>>>>> API.
>>>>>>>> Regards,
>>>>>>>> Dmitry Shaporenkov
>>>>>>>> JetBrains, Inc
>>>>>>>> http://www.jetbrains.com
>>>>>>>> "Develop with pleasure!"
>>>>>>>>>
>>>>>>>>> I already asked it once just wanted to know if it is something
>>>>>>>>> you
>>>>>>>>> are
>>>>>>>>> dealing with.
>>>>>>>>> Running macros that print some text to code window is very
>>>>>>>>> slow.
>>>>>>>>> Is there a way to disable enable R# through macros?
>>>>>>>>> Thanks
>>>>>>>>> Shimon


0

Please sign in to leave a comment.