You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Scott Kurz <sc...@gmail.com> on 2007/10/02 22:59:37 UTC

Databinding - Adding some toString()'s for servicability

In playing around with recent DataBinding code I found it helpful to add the
following to

DefaultTransformerExtensionPoint.java, for each of the LazyPush/LazyPull
transformers

        public String toString() {
            StringBuffer sb = new StringBuffer(super.toString());
            sb.append(";className=").append(className);
            return sb.toString();
        }

so I can see the transform chain in, say, a debugger.

Maybe if one of the committers finds this valuable they could check this in?

Thanks,
Scott

Re: Databinding - Adding some toString()'s for servicability

Posted by ant elder <an...@gmail.com>.
Both sound good and as a user has been helpful enough to post exactly the
code they  find useful i've gone ahead and committed that for now while we
think about the more comprehensive solution.

   ...ant

On 10/3/07, Mike Edwards <mi...@gmail.com> wrote:
>
> Folks,
>
> I suppose this raises the bigger issue of support for tracing and
> debugging.  Should we implement small things like this toString
> suggestion or should we start to build a more comprehensive solution for
> providing debug and trace information?
>
>
> Yours,  Mike.
>
> Raymond Feng wrote:
> > Hi,
> >
> > In most of our code, we don't override Object.toString(). As a result,
> > we can only see the system hash code if a given object is highlighted in
> > the debugger. Should we implement the toString() for the classes that
> > represent the configuration model (including SCA and Tuscany-specific
> > metadata)?
> >
> > Thanks,
> > Raymond
> >
> > ----- Original Message ----- From: "Scott Kurz" <sc...@gmail.com>
> > To: <tu...@ws.apache.org>
> > Sent: Tuesday, October 02, 2007 1:59 PM
> > Subject: Databinding - Adding some toString()'s for servicability
> >
> >
> >> In playing around with recent DataBinding code I found it helpful to
> >> add the
> >> following to
> >>
> >> DefaultTransformerExtensionPoint.java, for each of the
> LazyPush/LazyPull
> >> transformers
> >>
> >>        public String toString() {
> >>            StringBuffer sb = new StringBuffer(super.toString());
> >>            sb.append(";className=").append(className);
> >>            return sb.toString();
> >>        }
> >>
> >> so I can see the transform chain in, say, a debugger.
> >>
> >> Maybe if one of the committers finds this valuable they could check
> >> this in?
> >>
> >> Thanks,
> >> Scott
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Databinding - Adding some toString()'s for servicability

Posted by Mike Edwards <mi...@gmail.com>.
Folks,

I suppose this raises the bigger issue of support for tracing and 
debugging.  Should we implement small things like this toString 
suggestion or should we start to build a more comprehensive solution for 
providing debug and trace information?


Yours,  Mike.

Raymond Feng wrote:
> Hi,
> 
> In most of our code, we don't override Object.toString(). As a result, 
> we can only see the system hash code if a given object is highlighted in 
> the debugger. Should we implement the toString() for the classes that 
> represent the configuration model (including SCA and Tuscany-specific 
> metadata)?
> 
> Thanks,
> Raymond
> 
> ----- Original Message ----- From: "Scott Kurz" <sc...@gmail.com>
> To: <tu...@ws.apache.org>
> Sent: Tuesday, October 02, 2007 1:59 PM
> Subject: Databinding - Adding some toString()'s for servicability
> 
> 
>> In playing around with recent DataBinding code I found it helpful to 
>> add the
>> following to
>>
>> DefaultTransformerExtensionPoint.java, for each of the LazyPush/LazyPull
>> transformers
>>
>>        public String toString() {
>>            StringBuffer sb = new StringBuffer(super.toString());
>>            sb.append(";className=").append(className);
>>            return sb.toString();
>>        }
>>
>> so I can see the transform chain in, say, a debugger.
>>
>> Maybe if one of the committers finds this valuable they could check 
>> this in?
>>
>> Thanks,
>> Scott
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Databinding - Adding some toString()'s for servicability

Posted by Raymond Feng <en...@gmail.com>.
Hi,

In most of our code, we don't override Object.toString(). As a result, we 
can only see the system hash code if a given object is highlighted in the 
debugger. Should we implement the toString() for the classes that represent 
the configuration model (including SCA and Tuscany-specific metadata)?

Thanks,
Raymond

----- Original Message ----- 
From: "Scott Kurz" <sc...@gmail.com>
To: <tu...@ws.apache.org>
Sent: Tuesday, October 02, 2007 1:59 PM
Subject: Databinding - Adding some toString()'s for servicability


> In playing around with recent DataBinding code I found it helpful to add 
> the
> following to
>
> DefaultTransformerExtensionPoint.java, for each of the LazyPush/LazyPull
> transformers
>
>        public String toString() {
>            StringBuffer sb = new StringBuffer(super.toString());
>            sb.append(";className=").append(className);
>            return sb.toString();
>        }
>
> so I can see the transform chain in, say, a debugger.
>
> Maybe if one of the committers finds this valuable they could check this 
> in?
>
> Thanks,
> Scott
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org