25 #include "internal/berryExpressionPlugin.h" 26 #include "internal/berryCompositeExpression.h" 28 #include "Poco/DOM/Node.h" 29 #include "Poco/DOM/Element.h" 34 ExpressionConverter* ExpressionConverter::INSTANCE =
nullptr;
39 if (INSTANCE)
return INSTANCE;
41 QList<ElementHandler::Pointer> handlers;
56 for (
int i = 0; i < fHandlers.size(); i++) {
68 for (
int i = 0; i < fHandlers.size(); i++) {
79 const CompositeExpression::Pointer& result)
81 QList<IConfigurationElement::Pointer> children(element->GetChildren());
83 QList<IConfigurationElement::Pointer>::iterator iter;
84 for (iter = children.begin(); iter != children.end(); ++iter)
103 buf.append(configurationElement->GetName());
110 buf.append(parent2->GetName());
111 QString
id= parent2->GetAttribute(
"id");
114 buf.append(
" (id=").append(
id).append(
')');
116 parent= parent2->GetParent();
121 buf.append(parent2->GetExtensionPointUniqueIdentifier());
123 buf.append(parent2->GetContributor()->GetName());
136 const CompositeExpression::Pointer& result)
138 Poco::XML::Node* child = element->firstChild();
139 while (child !=
nullptr) {
140 if (child->nodeType() == Poco::XML::Node::ELEMENT_NODE) {
141 Poco::XML::Element* elem =
static_cast<Poco::XML::Element*
>(child);
153 child = child->nextSibling();
static MsgHandler handler
void ProcessChildren(const SmartPointer< IConfigurationElement > &element, const SmartPointer< CompositeExpression > &result)
static ExpressionConverter * GetDefault()
SmartPointer< Other > Cast() const
SmartPointer< Expression > Perform(const SmartPointer< IConfigurationElement > &root)
QString GetDebugPath(const SmartPointer< IConfigurationElement > &configurationElement)
berry::SmartPointer< Self > Pointer
ExpressionConverter(const QList< SmartPointer< ElementHandler > > &handlers)
static ElementHandler::Pointer GetDefault()