Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 80816 Details for
Bug 206460
manifestFolderRenameParticipant causes NPE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch
206640_patch.txt (text/plain), 2.11 KB, created by
Joern Dinkla
on 2007-10-20 03:37:48 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joern Dinkla
Created:
2007-10-20 03:37:48 EDT
Size:
2.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java,v >retrieving revision 1.7 >diff -u -r1.7 ContainerRenameParticipant.java >--- src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java 2 Oct 2007 22:03:04 -0000 1.7 >+++ src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java 20 Oct 2007 07:36:03 -0000 >@@ -84,16 +84,19 @@ > BundleTextChangeListener listener = new BundleTextChangeListener(((BundleModel)bundle.getModel()).getDocument()); > bundle.getModel().addModelChangedListener(listener); > >- BundleSymbolicNameHeader header = (BundleSymbolicNameHeader)bundle.getManifestHeader(Constants.BUNDLE_SYMBOLICNAME); > // can't check the id to the project name. Must run Id calculation code incase project name has invalid OSGi chars > String calcProjectId = IdUtil.getValidId(fProject.getName()); >- String oldText = header.getId(); >- // don't update Bundle-SymbolicName if the id and project name don't match >- if (!oldText.equals(calcProjectId)) >- return null; > // remember to create a valid OSGi Bundle-SymbolicName. Project name does not have that garuntee > String newId = IdUtil.getValidId(newText); >- header.setId(newId); >+ >+ BundleSymbolicNameHeader header = (BundleSymbolicNameHeader)bundle.getManifestHeader(Constants.BUNDLE_SYMBOLICNAME); >+ if ( header != null ) { >+ String oldText = header.getId(); >+ // don't update Bundle-SymbolicName if the id and project name don't match >+ if (!oldText.equals(calcProjectId)) >+ return null; >+ header.setId(newId); >+ } > // at this point, neither the project or file will exist. > // The project/resources get refactored before the TextChange is applied, therefore we need their future locations > IProject newProject = ((IWorkspaceRoot)manifest.getProject().getParent()).getProject(newText);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 206460
: 80816