Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tigerstripe-dev] Refactoring API

Title: Re: [tigerstripe-dev] Refactoring API
Hi Eric,

Thanks for pointing to the problem :) Initially we did not put any semantic into URI, however it looks like we shall have at least hierarchical URIs as an option.

What we'd like to propose for currently releasing version is to add boolean "affectChildren" parameter to both "delete" and "change" methods, which when true will perform required operation on all the children in the hierarchy.

Yuri will provide implementation this morning assuming explicitly hierarchical URI formats like scheme,segments,fragment. For more complex cases (when clients only knows about URI structure) in future TAF may allow clients to provide a kind of IURIChildrenProvider instances (which will return children URIs for particular one) - something like JFace content providers, and other helper structures allowing to perform refactoring for URIs with unknown (to TAF) structure... But let's leave this for future.

Do you think something like this will work for now?

Kind Regards,
Andrey

----- Original Message -----
From: "Eric Dillon" <erdillon@xxxxxxxxx>
To: "Tigerstripe developers list" <tigerstripe-dev@xxxxxxxxxxx>, "Andrey Platov" <andrey@xxxxxxxxx>
Sent: Wednesday, June 4, 2008 5:29:08 AM GMT +06:00 Almaty, Novosibirsk
Subject: Re: [tigerstripe-dev] Refactoring API

Hi Andrey,

Ok, so I’ve hooked up Tigerstripe notifications to the refactoring support, and I’ve been doing a bit of testing/playing.
On simple cases, things work, but then on the “interesting case” :-) things don’t work.

In particular, let’s say I have an annotation on an artifact, and on an attribute of that artifact. That means I have annotations on:

tigerstripe:/Foo/com.mycompany.Artifact
tigerstripe:/Foo/com.mycompany.Artifact#attr

Now, if I rename the attribute from “attr” to “attr2” everything is fine (the simple case).
If I remove the Artifact to “Artifact2”, I end up with annotations on

tigerstripe:/Foo/com.mycompany.Artifact2
tigerstripe:/Foo/com.mycompany.Artifact#attr (<--- not Artifact2#attr), which object doesn’t exist anymore as attr is now in Artifact2.

Even worse, what if I rename the project to “Foo2”?

What is the best way to handle this? These URIs are all Hierarchical, so is there a way to get all annotations for a “partial” URI? Should the framework be handling the containment, or should the client do it?

Note that I’m realizing that our URIs should look like:
tigerstripe:/Foo/com/mycompany/Artifact2#attr so the containment is truly explicit... Then the TAF might be able to deal with it? (Scheme + segments[4] + fragment)

Eric

On 6/3/08 6:14 AM, "Andrey Platov" <andrey@xxxxxxxxx> wrote:

Hi folks,

Initial API to support refactoring is done and pretty simple, see: http://wiki.eclipse.org/Howto:_Register_Refactoring_Support

Kind Regards,
Andrey



_______________________________________________
tigerstripe-dev mailing list
tigerstripe-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tigerstripe-dev

Back to the top