Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 164058 - [context] task context elements should participate in all refactorings
Summary: [context] task context elements should participate in all refactorings
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: dev   Edit
Hardware: PC Windows XP
: P4 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 112721 344166 (view as bug list)
Depends on:
Blocks: 282416
  Show dependency tree
 
Reported: 2006-11-09 22:13 EST by Erick Dovale CLA
Modified: 2011-07-26 14:40 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erick Dovale CLA 2006-11-09 22:13:29 EST
In my company we run into a problem when trying to adopt mylar. Several developers had the same project checked out in their workspaces with different project names. When one developer tried to retrieve the context of a task that was created by another developer it was completely useless because the project names were different and mylar was unable to find the relevant resources.
We thought that by renaming the project the task context would get updated but it doesn't.
So, i wish mylar was able to update the context files when the projects are renamed. 
Could this be also true for method and classes? Is mylar listening to refactoring events to appropriately update the context?
Comment 1 Mik Kersten CLA 2006-11-11 02:50:27 EST
Yes, we have this problem too, and so sometimes oure contexts 'miss' this information.  Our current idea is to use the refactoring history (project -> Properties -> Refactoring History) to support this.  I assume that it is possible for your team to enable the setting to store the refactoring history in the project folder?
Comment 2 Erick Dovale CLA 2006-11-11 10:56:51 EST
Why do you say "after refactoring outside of workspace"?? 
When i say "renamed the project" i mean refactored the name of the project inside the workspace and the context did not get refactored.
Comment 3 Willian Mitsuda CLA 2006-11-11 14:47:57 EST
I think what Erick wants is to make the context contents participate on refactorings, via refactoring participant extension point. Right?
Comment 4 Mik Kersten CLA 2006-11-11 19:10:37 EST
Sorry, I misunderstood.  I created bug 164243 for the problem described in comment#1.

Regarding this problem, I created the following FAQ entry: http://wiki.eclipse.org/index.php/Mylar_FAQ#Why_is_interest_lost_when_I_retrieve_someone_else.27s_context.3F

The problem is that we rely on the project's name to determine the project's identity, as that is the simplest approach that works across local projects and those managed by different team providers.  The current work-around is to standardize on the project names when sharing context.  Please vote for this bug if that approach does not work for you.
Comment 5 Erick Dovale CLA 2006-11-11 22:33:00 EST
Relyimg in the project name is not a bad thing. Unless there is a different way to guarantee context validity across workspaces, this seems pretty reasonable.
What I meant, as William said, is to have the task context participate in rafactorings.
Comment 6 Willian Mitsuda CLA 2006-11-20 20:24:04 EST
Another issue related to the lack of refactoring participation that I got today:

- Synchronize your project with automatic change sets management on.
- Execute the move refactoring on a changed file.
- After that, the file will lost its degree of interest and will get out the change set.

Workaround:

- Drop the synchronization.
- Mark the refactored resources as mylar landmark to force interest.
- Re-synchronize.

However, there is a bug here: the refactored resource will not appear in the change set, neither on the other change sets (including the "no change set"), but if you make a patch it will appear there.

I haven't tried, but I think that if in this case you try to commit the change set, the missing file will be commited together. I think so, because I saw this type of bug to happen many types, and now it finally appears to be a reproducible case.
Comment 7 Mik Kersten CLA 2006-11-22 22:48:53 EST
Willian: some of the problem you describe in comment#6 is fixed by better resource delta management.

We already participate in some refactorings, but should do this consistently across all to avoid problems like those described here.  Will schedule post 1.0.
Comment 8 Mik Kersten CLA 2007-06-11 18:55:46 EDT
*** Bug 191867 has been marked as a duplicate of this bug. ***
Comment 9 Mik Kersten CLA 2007-08-26 16:22:29 EDT
Will consider this for 3.0.  It's important for preserving the fidelity of the context model.
Comment 10 Steven Curtis CLA 2008-03-26 14:53:07 EDT
Does this bug address the problem outlined in the following conversation?

From: Jörg Thönnes [mailto:Joerg.Thoennes@macd.com] 
Sent: Wednesday, March 26, 2008 11:55 AM
To: Curtis, Steven
Subject: Re: Large refactoring

On 03/26/08 15:24, Steven Curtis wrote:
> I have a large refactoring job in which a commonly used file is being
> moved from one package to another.  With a task activated, Refactor ->
> Move completes the job be modifying more than 70 files, but only the
> file being moved is added to the task context.  Why aren't the other 70
> files added as well?  Am I missing something?

AFAIK the refactoring events are not handled by Mylyn at the moment.
Even if I move a single file the context lacks the methods/classes acccessed
in the old file.

There is a related bug in the Eclipse Bugzilla, this should be planned for 3.0.

Please look for the bug and vote on it.

Thanks, Jörg
Comment 11 Jörg Thönnes CLA 2008-04-09 02:33:00 EDT
Hi Mik.,

you decreased the priority to P4 (enhancement). Personally, I consider this as a notable restriction on Mylyns context
tracking and do hope that this will be part of the 3.0 release.

Thanks, Jörg
Comment 12 Steven Curtis CLA 2008-04-09 09:44:21 EDT
(In reply to comment #10)
> Does this bug address the problem outlined in the following conversation?
> 
From reading previous posts, the answer is yes.  Thank you for paying no attention to my comment.  I should read more.
Comment 13 Mik Kersten CLA 2008-04-10 20:44:14 EDT
Jörg: I would really like to get to this for 3.0, but made it a P4 because it is a very involved change that would come at the sacrifice of the API improvements that we have prioritized for 3.0.  
Comment 14 Jörg Thönnes CLA 2008-04-11 07:18:29 EDT
 (In reply to comment #13)
> Jörg: I would really like to get to this for 3.0, but made it a P4 because it is
> a very involved change that would come at the sacrifice of the API improvements
> that we have prioritized for 3.0.

OK, understood. So I continue to use my "normal" time tracker and use the Mylyn time tracking
just for sanity checking.

It is quite clear to me that the API improvements lay the base for any new things to come.
Hopefully, there will also be a (better) API for time tracking support.
Comment 15 Mik Kersten CLA 2008-06-12 18:16:11 EDT
Need to defer: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
Comment 16 Mik Kersten CLA 2008-06-12 18:22:08 EDT
*** Bug 112721 has been marked as a duplicate of this bug. ***
Comment 17 Steffen Pingel CLA 2011-07-26 14:40:48 EDT
*** Bug 344166 has been marked as a duplicate of this bug. ***
Comment 18 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn