You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Noel Grandin <no...@gmail.com> on 2011/08/04 08:43:18 UTC

renaming wtk.text.Span to wtk.text.TextSpan?

Hi

I'd like to rename Span to TextSpan because I keep having to specify the fully qualified class name in code where we are
using both
wtk.text.Span
and
wtk.Span

Any objections?

-- Noel

Re: renaming wtk.text.Span to wtk.text.TextSpan?

Posted by Sandro Martini <sa...@gmail.com>.
> I see there is also a org.apache.pivot.wtk.text.List class.
Good suggestion, Chris ... Noel, what do you think on do the same little
change even on this class, to avoid naming confusion between classes
(without package of course) ?

Bye



--
View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/renaming-wtk-text-Span-to-wtk-text-TextSpan-tp3224613p3224810.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Re: renaming wtk.text.Span to wtk.text.TextSpan?

Posted by Noel Grandin <no...@gmail.com>.
It generally doesn't bother people because you either use one or the other in any given class.

Chris Bartlett wrote:
> Ignore the main body - you beat me to it!
> This bit might still be relevant though.
>
> On 4 August 2011 15:25, Chris Bartlett <cb...@gmail.com> wrote:
>> I see there is also a org.apache.pivot.wtk.text.List class.  Do the
>> same hassles exist with that, or no so much as the API and intent are
>> so different between it and org.apache.pivot.collections.List?


Re: renaming wtk.text.Span to wtk.text.TextSpan?

Posted by Chris Bartlett <cb...@gmail.com>.
Ignore the main body - you beat me to it!
This bit might still be relevant though.

On 4 August 2011 15:25, Chris Bartlett <cb...@gmail.com> wrote:
> I see there is also a org.apache.pivot.wtk.text.List class.  Do the
> same hassles exist with that, or no so much as the API and intent are
> so different between it and org.apache.pivot.collections.List?

Re: renaming wtk.text.Span to wtk.text.TextSpan?

Posted by Chris Bartlett <cb...@gmail.com>.
Noel,

Like Sandro, I would prefer to see a less intrusive change if
possible, but I am not familiar with the package.

Would this help?
- rename org.apache.pivot.wtk.text.Span to org.apache.pivot.wtk.text.TextSpan
- recreate org.apache.pivot.wtk.text.Span as a deprecated subclass of
org.apache.pivot.wtk.text.TextSpan (with some javadoc notes explaining
its purpose)

Then you could use org.apache.pivot.wtk.Span and together
org.apache.pivot.wtk.text.TextSpan without qualifying them, and there
shouldn't be a clash with (the newly created & deprecated)
org.apache.pivot.wtk.text.Span.

Any other code using org.apache.pivot.wtk.text.Span would be flagged
as containing a deprecated class (assuming the warnings are not
ignored), so the transition between Span & TextSpan could happen at
the leisure of the end user.

I see there is also a org.apache.pivot.wtk.text.List class.  Do the
same hassles exist with that, or no so much as the API and intent are
so different between it and org.apache.pivot.collections.List?

Chris

On 4 August 2011 13:53, Sandro Martini <sa...@gmail.com> wrote:
> Hi Noel,
> Of course in a maintenance release an incompatible change like this is not
> the best, but for me no problem, go with the change. Maybe only report this
> change in a jira ticket, so will be visible in release notes.
>
> Bye
>  Il giorno 04/ago/2011 08:44, "Noel Grandin" <no...@gmail.com> ha
> scritto:
>> Hi
>>
>> I'd like to rename Span to TextSpan because I keep having to specify the
> fully qualified class name in code where we are
>> using both
>> wtk.text.Span
>> and
>> wtk.Span
>>
>> Any objections?
>>
>> -- Noel
>

Re: renaming wtk.text.Span to wtk.text.TextSpan?

Posted by Sandro Martini <sa...@gmail.com>.
> I can leave the old Span class in as a subclass of the new TextSpan, but
marked as deprecated, so that old code will continue to run.
Ok, even better, so no need for a ticket ...

Bye


--
View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/renaming-wtk-text-Span-to-wtk-text-TextSpan-tp3224613p3224765.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Re: renaming wtk.text.Span to wtk.text.TextSpan?

Posted by Noel Grandin <no...@gmail.com>.
I can leave the old Span class in as a subclass of the new TextSpan, but marked as deprecated, so that old code will
continue to run.

Sandro Martini wrote:
> Hi Noel,
> Of course in a maintenance release an incompatible change like this is not
> the best, but for me no problem, go with the change. Maybe only report this
> change in a jira ticket, so will be visible in release notes.
>
> Bye
>  Il giorno 04/ago/2011 08:44, "Noel Grandin" <no...@gmail.com> ha
> scritto:
>> Hi
>>
>> I'd like to rename Span to TextSpan because I keep having to specify the
> fully qualified class name in code where we are
>> using both
>> wtk.text.Span
>> and
>> wtk.Span
>>
>> Any objections?
>>
>> -- Noel


Re: renaming wtk.text.Span to wtk.text.TextSpan?

Posted by Sandro Martini <sa...@gmail.com>.
Hi Noel,
Of course in a maintenance release an incompatible change like this is not
the best, but for me no problem, go with the change. Maybe only report this
change in a jira ticket, so will be visible in release notes.

Bye
 Il giorno 04/ago/2011 08:44, "Noel Grandin" <no...@gmail.com> ha
scritto:
> Hi
>
> I'd like to rename Span to TextSpan because I keep having to specify the
fully qualified class name in code where we are
> using both
> wtk.text.Span
> and
> wtk.Span
>
> Any objections?
>
> -- Noel