Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Tigerstripe » Refactoring
Refactoring [message #11507] Wed, 09 July 2008 15:23 Go to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Dear all,

while trying to import from XMI, I had an object for which I had to choose
the artefact. I choose Entity, but after loading, I got the message Key
not found and I realized it should have being a Datatype artefact.

How can I change from an artefact to another?
I looked into Refactor, but there is just rename and move.

Thanks,

Marc
Re: Refactoring [message #11543 is a reply to message #11507] Wed, 09 July 2008 15:39 Go to previous messageGo to next message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Hi Marc,

There used to be an additional entry in the refactor menu to do that, but it
was mostly broken, so we took it out as part of the open-source move.

The initial design was wrong in that you'd be able to refactor from anything
to anything whereas some refactor don't make sense (association to entity
makes no sense).

So, what we need is "refactoring options that make sense based on the
starting point". For example:
- Entity<->Datatype
- Association<->Dependency
- Association<->AssociationClass
- Datatype<->Query<->UpdateProc<->Event

Bug 221443 covers the refactoring from Association to Association Class.

And should be extended to address the other cases.

Does that make sense to you?

Eric

On 7/9/08 8:23 AM, in article
32fc6d642c0af7145037a4b5f3bfa794$1@www.eclipse.org, "Marc FLAUW"
<marc.flauw@hp.com> wrote:

> Dear all,
>
> while trying to import from XMI, I had an object for which I had to choose
> the artefact. I choose Entity, but after loading, I got the message Key
> not found and I realized it should have being a Datatype artefact.
>
> How can I change from an artefact to another?
> I looked into Refactor, but there is just rename and move.
>
> Thanks,
>
> Marc
>
Re: Refactoring [message #11580 is a reply to message #11543] Wed, 09 July 2008 15:44 Go to previous messageGo to next message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Now... A work around would be for you to edit the .java file for that thing.
Change the top level tag from
@tigerstripe.managedEntity to @tigerstripe.datatype.

Save it and open it with the Tigerstripe Explorer, and make a tiny change
(description e.g.) to force it to reparse/save it.

This is a hack... But in the meantime it may help :-).

Eric


On 7/9/08 8:39 AM, in article C49A29A7.652B%erdillon@cisco.com, "Eric
Dillon" <erdillon@cisco.com> wrote:

> Hi Marc,
>
> There used to be an additional entry in the refactor menu to do that, but it
> was mostly broken, so we took it out as part of the open-source move.
>
> The initial design was wrong in that you'd be able to refactor from anything
> to anything whereas some refactor don't make sense (association to entity
> makes no sense).
>
> So, what we need is "refactoring options that make sense based on the
> starting point". For example:
> - Entity<->Datatype
> - Association<->Dependency
> - Association<->AssociationClass
> - Datatype<->Query<->UpdateProc<->Event
>
> Bug 221443 covers the refactoring from Association to Association Class.
>
> And should be extended to address the other cases.
>
> Does that make sense to you?
>
> Eric
>
> On 7/9/08 8:23 AM, in article
> 32fc6d642c0af7145037a4b5f3bfa794$1@www.eclipse.org, "Marc FLAUW"
> <marc.flauw@hp.com> wrote:
>
>> Dear all,
>>
>> while trying to import from XMI, I had an object for which I had to choose
>> the artefact. I choose Entity, but after loading, I got the message Key
>> not found and I realized it should have being a Datatype artefact.
>>
>> How can I change from an artefact to another?
>> I looked into Refactor, but there is just rename and move.
>>
>> Thanks,
>>
>> Marc
>>
>
Re: Refactoring [message #11616 is a reply to message #11580] Thu, 10 July 2008 10:36 Go to previous messageGo to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Eric,

Thanks for the response.

I know the hack. I used it already, but today, I am just playing with the
SID model so I don't have the time to hack each file.

I understand the concern around refactoring, but I had this exact need
with the model import: I don't know exactly what X is, so let's make it an
entity and then Tigerstripe complain about no key after the import is
completed and you realize that it should have been a datatype.

So this situation is likely to happen. I agree we need to restrict what we
can refactor to, as some combinations don't make sense.

Do you want me to open an enhancement bug?

Thanks,

Marc
Re: Refactoring [message #11651 is a reply to message #11616] Thu, 10 July 2008 14:07 Go to previous message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Go ahead with the enhancement bug :-)

Eric


On 7/10/08 3:36 AM, in article
f07a06a2ce83c208af4f8e7e84d1bdad$1@www.eclipse.org, "Marc FLAUW"
<marc.flauw@hp.com> wrote:

> Eric,
>
> Thanks for the response.
>
> I know the hack. I used it already, but today, I am just playing with the
> SID model so I don't have the time to hack each file.
>
> I understand the concern around refactoring, but I had this exact need
> with the model import: I don't know exactly what X is, so let's make it an
> entity and then Tigerstripe complain about no key after the import is
> completed and you realize that it should have been a datatype.
>
> So this situation is likely to happen. I agree we need to restrict what we
> can refactor to, as some combinations don't make sense.
>
> Do you want me to open an enhancement bug?
>
> Thanks,
>
> Marc
>
Re: Refactoring [message #563531 is a reply to message #11507] Wed, 09 July 2008 15:39 Go to previous message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Hi Marc,

There used to be an additional entry in the refactor menu to do that, but it
was mostly broken, so we took it out as part of the open-source move.

The initial design was wrong in that you'd be able to refactor from anything
to anything whereas some refactor don't make sense (association to entity
makes no sense).

So, what we need is "refactoring options that make sense based on the
starting point". For example:
- Entity<->Datatype
- Association<->Dependency
- Association<->AssociationClass
- Datatype<->Query<->UpdateProc<->Event

Bug 221443 covers the refactoring from Association to Association Class.

And should be extended to address the other cases.

Does that make sense to you?

Eric

On 7/9/08 8:23 AM, in article
32fc6d642c0af7145037a4b5f3bfa794$1@www.eclipse.org, "Marc FLAUW"
<marc.flauw@hp.com> wrote:

> Dear all,
>
> while trying to import from XMI, I had an object for which I had to choose
> the artefact. I choose Entity, but after loading, I got the message Key
> not found and I realized it should have being a Datatype artefact.
>
> How can I change from an artefact to another?
> I looked into Refactor, but there is just rename and move.
>
> Thanks,
>
> Marc
>
Re: Refactoring [message #563555 is a reply to message #11543] Wed, 09 July 2008 15:44 Go to previous message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Now... A work around would be for you to edit the .java file for that thing.
Change the top level tag from
@tigerstripe.managedEntity to @tigerstripe.datatype.

Save it and open it with the Tigerstripe Explorer, and make a tiny change
(description e.g.) to force it to reparse/save it.

This is a hack... But in the meantime it may help :-).

Eric


On 7/9/08 8:39 AM, in article C49A29A7.652B%erdillon@cisco.com, "Eric
Dillon" <erdillon@cisco.com> wrote:

> Hi Marc,
>
> There used to be an additional entry in the refactor menu to do that, but it
> was mostly broken, so we took it out as part of the open-source move.
>
> The initial design was wrong in that you'd be able to refactor from anything
> to anything whereas some refactor don't make sense (association to entity
> makes no sense).
>
> So, what we need is "refactoring options that make sense based on the
> starting point". For example:
> - Entity<->Datatype
> - Association<->Dependency
> - Association<->AssociationClass
> - Datatype<->Query<->UpdateProc<->Event
>
> Bug 221443 covers the refactoring from Association to Association Class.
>
> And should be extended to address the other cases.
>
> Does that make sense to you?
>
> Eric
>
> On 7/9/08 8:23 AM, in article
> 32fc6d642c0af7145037a4b5f3bfa794$1@www.eclipse.org, "Marc FLAUW"
> <marc.flauw@hp.com> wrote:
>
>> Dear all,
>>
>> while trying to import from XMI, I had an object for which I had to choose
>> the artefact. I choose Entity, but after loading, I got the message Key
>> not found and I realized it should have being a Datatype artefact.
>>
>> How can I change from an artefact to another?
>> I looked into Refactor, but there is just rename and move.
>>
>> Thanks,
>>
>> Marc
>>
>
Re: Refactoring [message #563579 is a reply to message #11580] Thu, 10 July 2008 10:36 Go to previous message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Eric,

Thanks for the response.

I know the hack. I used it already, but today, I am just playing with the
SID model so I don't have the time to hack each file.

I understand the concern around refactoring, but I had this exact need
with the model import: I don't know exactly what X is, so let's make it an
entity and then Tigerstripe complain about no key after the import is
completed and you realize that it should have been a datatype.

So this situation is likely to happen. I agree we need to restrict what we
can refactor to, as some combinations don't make sense.

Do you want me to open an enhancement bug?

Thanks,

Marc
Re: Refactoring [message #563605 is a reply to message #11616] Thu, 10 July 2008 14:07 Go to previous message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Go ahead with the enhancement bug :-)

Eric


On 7/10/08 3:36 AM, in article
f07a06a2ce83c208af4f8e7e84d1bdad$1@www.eclipse.org, "Marc FLAUW"
<marc.flauw@hp.com> wrote:

> Eric,
>
> Thanks for the response.
>
> I know the hack. I used it already, but today, I am just playing with the
> SID model so I don't have the time to hack each file.
>
> I understand the concern around refactoring, but I had this exact need
> with the model import: I don't know exactly what X is, so let's make it an
> entity and then Tigerstripe complain about no key after the import is
> completed and you realize that it should have been a datatype.
>
> So this situation is likely to happen. I agree we need to restrict what we
> can refactor to, as some combinations don't make sense.
>
> Do you want me to open an enhancement bug?
>
> Thanks,
>
> Marc
>
Previous Topic:Refactoring
Next Topic:Tigerstripe Release Review
Goto Forum:
  


Current Time: Tue Mar 19 02:32:46 GMT 2024

Powered by FUDForum. Page generated in 0.02587 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top