Source:
protected TextFileChange updateBundleHeader(IFile manifest, IProgressMonitor monitor) throws CoreException { SubMonitor subMonitor = SubMonitor.convert(monitor, "", 2); try { IBundle bundle = BundleManifestChange.getBundle(manifest, subMonitor.newChild(1)); if (bundle != null) { BundleTextChangeListener listener = createListener(bundle); if (listener != null) { IManifestHeader mHeader = bundle.getManifestHeader(fHeaderKey); if (mHeader instanceof BundleSymbolicNameHeader) { ((BundleSymbolicNameHeader) mHeader).setId(fNewValue); } else if (mHeader instanceof RequireBundleHeader) { RequireBundleHeader header = (RequireBundleHeader) mHeader; RequireBundleObject bundles[] = header.getRequiredBundles(); for (int i = 0; i < bundles.length; i++) { if (bundles[i].getId().equals(fOldValue)) bundles[i].setId(fNewValue); } } else if (mHeader instanceof FragmentHostHeader) { ((FragmentHostHeader) mHeader).setHostId(fNewValue); } else if (mHeader instanceof ExportPackageHeader) { ExportPackageObject[] packages = ((ExportPackageHeader) mHeader).getPackages(); for (int i = 0; i < packages.length; i++) { PackageFriend[] friends = packages[i].getFriends(); for (int j = 0; j < friends.length; j++) { if (friends[j].getName().equals(fOldValue)) { packages[i].removeFriend(friends[j]); packages[i].addFriend(new PackageFriend(packages[i], fNewValue)); } } } } return getTextChange(listener, manifest); } } } catch (MalformedTreeException e) { } catch (CoreException e) { } catch (BadLocationException e) { } finally { FileBuffers.getTextFileBufferManager().disconnect(manifest.getFullPath(), LocationKind.NORMALIZE, subMonitor.newChild(1)); } return null; }

Target:
protected TextFileChange updateBundleHeader(IFile manifest, IProgressMonitor monitor) throws CoreException { SubMonitor subMonitor = SubMonitor.convert(monitor, 2); try { IBundle bundle = BundleManifestChange.getBundle(manifest, subMonitor.newChild(1)); if (bundle != null) { BundleTextChangeListener listener = createListener(bundle); if (listener != null) { IManifestHeader mHeader = bundle.getManifestHeader(fHeaderKey); if (mHeader instanceof BundleSymbolicNameHeader) { ((BundleSymbolicNameHeader) mHeader).setId(fNewValue); } else if (mHeader instanceof RequireBundleHeader) { RequireBundleHeader header = (RequireBundleHeader) mHeader; RequireBundleObject bundles[] = header.getRequiredBundles(); for (int i = 0; i < bundles.length; i++) { if (bundles[i].getId().equals(fOldValue)) bundles[i].setId(fNewValue); } } else if (mHeader instanceof FragmentHostHeader) { ((FragmentHostHeader) mHeader).setHostId(fNewValue); } else if (mHeader instanceof ExportPackageHeader) { ExportPackageObject[] packages = ((ExportPackageHeader) mHeader).getPackages(); for (int i = 0; i < packages.length; i++) { PackageFriend[] friends = packages[i].getFriends(); for (int j = 0; j < friends.length; j++) { if (friends[j].getName().equals(fOldValue)) { packages[i].removeFriend(friends[j]); packages[i].addFriend(new PackageFriend(packages[i], fNewValue)); } } } } return getTextChange(listener, manifest); } } } catch (MalformedTreeException e) { } catch (CoreException e) { } catch (BadLocationException e) { } finally { FileBuffers.getTextFileBufferManager().disconnect(manifest.getFullPath(), LocationKind.NORMALIZE, subMonitor.newChild(1)); } return null; }