#include "SketchPlugin_ExternalValidator.h"
#include "SketchPlugin_Feature.h"
+#include <Events_InfoMessage.h>
+
#include <ModelAPI_Session.h>
#include <ModelAPI_Result.h>
#include <ModelAPI_Tools.h>
#include <ModelAPI_AttributeRefAttr.h>
bool SketchPlugin_ExternalValidator::isValid(const AttributePtr& theAttribute,
- const std::list<std::string>& theArguments) const
+ const std::list<std::string>& theArguments,
+ Events_InfoMessage& theError) const
{
if (theArguments.size() != 1)
return true;
bool isParameterExternal = isExternalAttribute(aFeature->attribute(aFrontArgument));
// it is not possible that both features, attribute and attribute in parameter, are external
- if (isAttributeExternal && isParameterExternal)
+ if (isAttributeExternal && isParameterExternal) {
+ theError = "Both features, attribute and attribute in parameter, are external.";
return false;
+ }
return true;
}