Bug 166819 - Renaming project's name won't be renamed Bundle-SymbolicName
Summary: Renaming project's name won't be renamed Bundle-SymbolicName
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Brian Bauman CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 174924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-05 13:46 EST by Ikuo Yamasaki CLA
Modified: 2007-02-27 16:31 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ikuo Yamasaki CLA 2006-12-05 13:46:05 EST
When you rename a project's name in PDE, the Bundle-SymbolicName of manifest won't be renamed (also ID in manifest editor overview won't be renamed). Also when you copy a project into another, the new project contains the same Bundle-SymbolicName (and ID). Sometimes it causes trouble.
 Renaming Bundle-SymbolicName and ID automatically might be preferred. What do you think ?
Comment 1 Wassim Melhem CLA 2006-12-07 11:19:24 EST
there is nothing in the Eclipse bible that says that a plugin project name must match the bundle symbolic name.  It is just a recommended convention that should not be enforced by PDE, particularly implicitly during copy/refactoring.

As for the trouble that is caused when you copy/paste plug-ins, this is a separate and long-standing problem that we plan to address in the near future (bug 44512)
Comment 2 Brian Bauman CLA 2007-02-21 09:02:54 EST
*** Bug 174924 has been marked as a duplicate of this bug. ***
Comment 3 Gunnar Wagenknecht CLA 2007-02-21 10:11:19 EST
Mhm. WONTFIX sounds so final...

I know that there is nothing in the bible that the name must match. However, why can't PDE be smart enough to test if a name matches and offer to rename it together with the project? I thought PDE wants to be smart. ;)

BTW, I opened bug 174923 earlier today to request a "Rename Bundle" refactoring which would be useful as well.
Comment 4 Chris Aniszczyk CLA 2007-02-21 10:15:33 EST
I'll reopen this for investigating, I disagree a bit with Wassim here. Renaming bundles is a fairly common thing so anything PDE can do on this front should be investigated.
Comment 5 Wassim Melhem CLA 2007-02-21 10:22:25 EST
I agree with Gunnar's comment 3.  bug 174924 is asking for something slightly different.

I think it is a reasonable request.  Perhaps that is what this bug report was asking for that too, but was not worded as specifically...  We could/should do something about the renaming of the bundle symbolic name only if it matches the project name.  That would be helpful.

As for the copying of the project scenario in comment 0, I don't do we should mess with the bundle symbolic name.  PDE now supports multiple versions of the same plug-in in the same workspace, so you won't get into a messed up state.

Chris, I will let your defiance slide this time.  You're young and fell victim to Gunnar playing on your vanity with his "I thought PDE wants to be smart..." line.  You could not resist.

Well played, Gunnar.
Comment 6 Chris Aniszczyk CLA 2007-02-21 10:28:54 EST
I'm a sucker for it ;)
Comment 7 Brian Bauman CLA 2007-02-27 14:18:01 EST
I can take this one, I have an "easy" button from Staples :)
Comment 8 Brian Bauman CLA 2007-02-27 14:28:01 EST
Fixed.  We will update the Bundle-SymbolicName if the BSN is equal to the project name (more accurately, the calculated OSGi valid version of the project name).  Will be available in 3.3M6

Modified org.eclipse.pde.internal.ui.refactoring.BundleManifestChange v1.15, org.eclipse.pde.internal.ui.refactoring.ContainerRenameParticipant v1.2, and plugin.xml v1.402.
Comment 9 Brian Bauman CLA 2007-02-27 16:31:37 EST
Just as an update, the preview did not work correct for the project refactoring.  To help this along, I modified BundleManifestChange v1.16, ContainerRenameParticipant v1.3, and created class org.eclipse.pde.internal.ui.refactoring.MovedTextFileChange.