@Override
	public boolean isEnabledForContext(ActionContext context) {
        Object contextObject = context.getContextObject();
        if ( !(contextObject instanceof FieldHeaderLocation) ) {
            return false;
        }
        FieldHeaderLocation loc = (FieldHeaderLocation) contextObject;
        FieldFormatModel modelAtLocation = loc.getModel();
        
        FieldFactory[] allFactories = modelAtLocation.getAllFactories();
        return allFactories.length > 1;
	}
Constructor takes the CodeBrowserPlugin that created it and the header
component so that it can be repainted when fields are added.
@param owner the action owner	
@param panel the listing panel.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/format/actions/AddAllFieldAction.java