How can I comment out a method? [message #708471] |
Tue, 02 August 2011 21:10  |
Eclipse User |
|
|
|
Hi there,
I have been looking through the jdt core api and the dom api also. I can't find out how to comment out a method from my source code programmatically. Can this be done? If so, how?
Many thanks for your help,
Regards
|
|
|
(no subject) [message #708829 is a reply to message #708471] |
Wed, 03 August 2011 07:31   |
Eclipse User |
|
|
|
On 02.08.2011 23:10, john doe wrote:
> Hi there,
>
> I have been looking through the jdt core api and the dom api also. I
> can't find out how to comment out a method from my source code
> programmatically. Can this be done? If so, how?
Change the source.
Dani
>
> Many thanks for your help,
> Regards
|
|
|
|
Re: (no subject) [message #709051 is a reply to message #708970] |
Wed, 03 August 2011 12:56   |
Eclipse User |
|
|
|
While this forum doesn't have moderators per se, I do agree that Dani's response is not helpful, and I wonder why one would even bother writing something like that.
Hopefully someone else will respond with a bit more insight.
|
|
|
Re: (no subject) [message #709111 is a reply to message #709051] |
Wed, 03 August 2011 13:56   |
Eclipse User |
|
|
|
On 03.08.2011 14:56, Denis Roy wrote:
> While this forum doesn't have moderators per se, I do agree that
> Dani's response is not helpful, and I wonder why one would even bother
> writing something like that.
Because that is the right answer - though maybe a bit too short. There
is no API to comment code. You need to comment out the code by adding
the corresponding things to the source code. There are several API/ways
to change the source code in JDT Core.
Dani
>
> Hopefully someone else will respond with a bit more insight.
|
|
|
Re: (no subject) [message #709157 is a reply to message #709111] |
Wed, 03 August 2011 14:22   |
Eclipse User |
|
|
|
I guess looking on how CTRL+/ is implemented by guide the way how to do it.
Tom
Am 03.08.11 15:56, schrieb Daniel Megert:
> On 03.08.2011 14:56, Denis Roy wrote:
>> While this forum doesn't have moderators per se, I do agree that
>> Dani's response is not helpful, and I wonder why one would even bother
>> writing something like that.
> Because that is the right answer - though maybe a bit too short. There
> is no API to comment code. You need to comment out the code by adding
> the corresponding things to the source code. There are several API/ways
> to change the source code in JDT Core.
>
> Dani
>>
>> Hopefully someone else will respond with a bit more insight.
|
|
|
Re: (no subject) [message #709158 is a reply to message #709111] |
Wed, 03 August 2011 14:22   |
Eclipse User |
|
|
|
I guess looking on how CTRL+/ is implemented by guide the way how to do it.
Tom
Am 03.08.11 15:56, schrieb Daniel Megert:
> On 03.08.2011 14:56, Denis Roy wrote:
>> While this forum doesn't have moderators per se, I do agree that
>> Dani's response is not helpful, and I wonder why one would even bother
>> writing something like that.
> Because that is the right answer - though maybe a bit too short. There
> is no API to comment code. You need to comment out the code by adding
> the corresponding things to the source code. There are several API/ways
> to change the source code in JDT Core.
>
> Dani
>>
>> Hopefully someone else will respond with a bit more insight.
|
|
|
|
Re: (no subject) [message #714216 is a reply to message #709335] |
Wed, 10 August 2011 04:32   |
Eclipse User |
|
|
|
What do you mean by programmatically? As in, you want to disable a method during run-time from your program? I'm pretty sure that can't be done with a compiled language like Java. For that, you need an interpreted language. You may be able to achieve the same effect by setting a boolean value, and only executing that method if the boolean value is true...
[Updated on: Wed, 10 August 2011 04:32] by Moderator Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04567 seconds