try { IMember[] members= getSelectedMembers(selection); setEnabled(members != null && members.length > 0 && JavaModelUtil.isEditable(members[0].getCompilationUnit())); } catch (JavaModelException e) { JavaPlugin.log(e); setEnabled(false); }
IMember[] members= getSelectedMembers(selection); setEnabled(members != null && members.length > 0 && JavaModelUtil.isEditable(members[0].getCompilationUnit()));
	protected void selectionChanged(IStructuredSelection selection) {		try {			IMember[] members= getSelectedMembers(selection);			setEnabled(members != null && members.length > 0 && JavaModelUtil.isEditable(members[0].getCompilationUnit()));		} catch (JavaModelException e) {			JavaPlugin.log(e);			setEnabled(false);		}	}