Bug 19067 Useless error message
F2 - create project Test with source folder src - create folder data - create Test.java in data - paste content class Test { public Object field; } class B extends Test { public Object field2; } - select field2 - select Refactor->Pullup... You get an error message saying: Pull up is not allowed on elements declared in this type. This error message isn't very usefull. Even if we disble the action in the case of java files not on build path we should improve the message for case in which it is used. Why can't I pull up elements.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PullUpAction.java
*/
	protected void selectionChanged(IStructuredSelection selection) {
		setEnabled(canEnable(selection));
	}
	/*
	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#selectionChanged(ITextSelection)
	 */
	protected void selectionChanged(ITextSelection selection) {
	}
	
	/*
	 * @see SelectionDispatchAction#run(IStructuredSelection)
	 */
	protected void run(IStructuredSelection selection) {
		startRefactoring();
	}
	/*
	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#run(ITextSelection)
	 */
	protected void run(ITextSelection selection) {
		if (! canRun(selection)){
			String unavailable= RefactoringMessages.getString("PullUpAction.unavailable"); 
			MessageDialog.openInformation(getShell(), RefactoringMessages.getString("OpenRefactoringWizardAction.unavailable"), unavailable); 
			fRefactoring= null;
			return;
		}
		startRefactoring();	
	}
		
	private boolean canEnable(IStructuredSelection selection){