}
catch (IOException ioe) {
ErrorManager.getDefault().notify(ioe);
}
FileObject fo = result.getPrimaryFile();
if (fo.getExt().equals("java")) {
FileLock lock = null;
try {
PackageRemover.removeDeclaration(FileUtil.toFile(fo));
// IssueZilla 11986 - rename the FileObject
// so the JavaNode is resynchronized
lock = fo.lock();
if (lock != null) {
fo.rename(lock, fo.getName(), fo.getExt());
}
}
catch (IOException ioe) {
NotifyDescriptor d = new NotifyDescriptor.Message(
"Error removing package declaration from file: " +
fo.getNameExt() +
". You should manually remove this declaration " +
"before building the Parcel Recipe");
TopManager.getDefault().notify(d);
}
finally {