Bug 79278 Selfencapsulate Field does not support annotations [refactoring]
I20041117: Create annotation: public @interface Annotation { int property; } Invoke sef refactoring on "property" -> property is private (illegal modifier in annotations) and accessor is static and has method body. Apart from generating an accessor, sef is not of much value for annotations, so we might disable it.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SelfEncapsulateFieldAction.java
/*
	 * Should be private. But got shipped in this state in 2.0 so chaning this is a
	 * breaking API change.
	 */
	public void run(IField field) {
		if (!ActionUtil.isProcessable(getShell(), field))
			return;
		
		try  {	
			SelfEncapsulateFieldRefactoring refactoring= createRefactoring(field);
			if (refactoring == null)
				return;
			new RefactoringStarter().activate(
				refactoring, 
				new SelfEncapsulateFieldWizard(refactoring), getShell(), getDialogTitle(), true);
		} catch (JavaModelException e) {
			ExceptionHandler.handle(e, getDialogTitle(),
				ActionMessages.getString("SelfEncapsulateFieldAction.dialog.cannot_perform")); 
		}
	}
	private SelfEncapsulateFieldRefactoring createRefactoring(IField field) throws JavaModelException {
		return SelfEncapsulateFieldRefactoring.create(field);
	}
		
	private String getDialogTitle() {
		return ActionMessages.getString("SelfEncapsulateFieldAction.dialog.title"); 
	}	
}