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
SelfEncapsulateFieldRefactoring.isAvailable((IField)elements[0]);
	}
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	public void run(ITextSelection selection) {
		if (!ActionUtil.isProcessable(getShell(), fEditor))
			return;
		IJavaElement[] elements= SelectionConverter.codeResolveHandled(fEditor, getShell(), getDialogTitle());
		if (elements.length != 1 || !(elements[0] instanceof IField)) {
			MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.getString("SelfEncapsulateFieldAction.dialog.unavailable")); 
			return;
		}
		IField field= (IField)elements[0];
		try {
			if (field.isBinary() || JdtFlags.isEnum(field)) {
				MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.getString("SelfEncapsulateFieldAction.dialog.unavailable")); 
				return;
			}
		} catch (JavaModelException exception) {
			JavaPlugin.log(exception);
			return;
		}
		run(field);
	}
	
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.