本文整理汇总了C++中iconfigurationelement::Pointer::GetDeclaringExtension方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetDeclaringExtension方法的具体用法?C++ Pointer::GetDeclaringExtension怎么用?C++ Pointer::GetDeclaringExtension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iconfigurationelement::Pointer
的用法示例。
在下文中一共展示了Pointer::GetDeclaringExtension方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LogError
void RegistryReader::LogError(IConfigurationElement::Pointer element,
const std::string& text)
{
const IExtension* extension = element->GetDeclaringExtension();
std::string buf = "Plugin " + extension->GetNamespace() + ", extension "
+ extension->GetExtensionPointIdentifier();
// look for an ID if available - this should help debugging
std::string id;
if (element->GetAttribute("id", id))
{
buf.append(", id ");
buf.append(id);
}
buf.append(": " + text);
WorkbenchPlugin::Log(buf);
}
示例2: ProcessExtension
bool PerspectiveExtensionReader::ProcessExtension(
IConfigurationElement::Pointer element)
{
IConfigurationElement::vector children = element->GetChildren();
for (unsigned int nX = 0; nX < children.size(); nX++)
{
IConfigurationElement::Pointer child = children[nX];
std::string type = child->GetName();
if (this->IncludeTag(type))
{
bool result = false;
if (type == WorkbenchRegistryConstants::TAG_ACTION_SET)
{
result = this->ProcessActionSet(child);
}
else if (type == WorkbenchRegistryConstants::TAG_VIEW)
{
result = this->ProcessView(child);
}
else if (type == WorkbenchRegistryConstants::TAG_VIEW_SHORTCUT)
{
result = this->ProcessViewShortcut(child);
}
// else if (type == IorkbenchRegistryConstants::TAG_NEW_WIZARD_SHORTCUT)
// {
// result = processWizardShortcut(child);
// }
else if (type == WorkbenchRegistryConstants::TAG_PERSP_SHORTCUT)
{
result = this->ProcessPerspectiveShortcut(child);
}
else if (type == WorkbenchRegistryConstants::TAG_SHOW_IN_PART)
{
result = this->ProcessShowInPart(child);
}
if (!result)
{
WorkbenchPlugin::Log("Unable to process element: " + //$NON-NLS-1$
type + " in perspective extension: " + //$NON-NLS-1$
element->GetDeclaringExtension()->GetUniqueIdentifier());
}
}
}
return true;
}