private static boolean isTagDir(String uri, IDOMModel model) {
IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(model.getStructuredDocument(), 0);
if (context != null) {
IWorkspaceContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE.getWorkspaceContextResolver(context);
if (resolver != null) {
ITaglibDomainMetaDataModelContext tldContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(resolver.getProject(), uri);
Trait t = TaglibDomainMetaDataQueryHelper.getTrait(tldContext, "", "isTagDir"); //$NON-NLS-1$ //$NON-NLS-2$
return TraitValueHelper.getValueAsBoolean(t);
}
}
return false;