void DIEItem::ShowContext(DetailsView* detailsView, DIScope scope) { // TODO: Fill out these cases. if (scope.isCompileUnit()) { DICompileUnit diCompileUnit(scope); detailsView->Add(_("ContextType"), _("DICompileUnit")); detailsView->Add(_("Context"), toWxStr(diCompileUnit.getDirectory()) + _("/") + toWxStr(diCompileUnit.getFilename())); } else if (scope.isFile()) { DIFile diFile(scope); detailsView->Add(_("ContextType"), _("DIFile")); detailsView->Add(_("Context"), toWxStr(diFile.getDirectory()) + _("/") + toWxStr(diFile.getFilename())); } else if (scope.isNameSpace()) { DINameSpace diNameSpace(scope); detailsView->Add(_("ContextType"), _("DINameSpace")); detailsView->Add(_("Context"), diNameSpace.getName()); } else if (scope.isSubprogram()) { DISubprogram diSubprogram(scope); detailsView->Add(_("ContextType"), _("DISubprogram")); detailsView->Add(_("Context"), diSubprogram.getName()); } else if (scope.isLexicalBlock()) { detailsView->Add(_("ContextType"), _("DILexicalBlock")); // TODO: Implement context name. detailsView->Add(_("Context"), _("?{}")); } else if (scope.isType()) { detailsView->Add(_("ContextType"), _("DIType")); detailsView->Add(_("Context"), DITypeToString(DIType(scope))); } else { detailsView->Add(_("Context"), _("??? [Unknown]")); } }