Bug 31298 move of read-only java file gives error dialog after confirmation
- 'move' read-only java file - uncheck all options - choose dest package - press ok - confirm the movement of a read-only file -> error dialog
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
super.run(selection);
					}
				} finally {
					helper.triggerBuild();
				}
			}
		}
	}
	
	private boolean needsSaving(IStructuredSelection selection) {
		for (Iterator iter= selection.iterator(); iter.hasNext();) {
			Object element= (Object) iter.next();
			if (element instanceof ICompilationUnit || element instanceof IType)
				return true;
		}
		return false;
	}
	public static ElementTreeSelectionDialog makeDialog(Shell parent, MoveRefactoring refactoring) {
		StandardJavaElementContentProvider cp= new StandardJavaElementContentProvider() {
			public boolean hasChildren(Object element) {
				
				return !(element instanceof IPackageFragment) && super.hasChildren(element);
			}
		};
		MoveDestinationDialog dialog= new MoveDestinationDialog(
			parent,  new DestinationRenderer(JavaElementLabelProvider.SHOW_SMALL_ICONS),
			cp, refactoring);
		return dialog;
	}