} else if(parentElement instanceof IFile) {
/* possible model file */
IFile modelFile = (IFile) parentElement;
if(CDF_EXT.equals(modelFile.getFileExtension())) {
try {
ToolComponent model;
if (intDesc.describe(modelFile.getContents(), null)==IContentDescriber.VALID){
model = ToolInterface.fetch(modelFile.getProject(), modelFile);
children = model.getComponents() ;
}else if ((classDesc.describe(modelFile.getContents(), null)==IContentDescriber.VALID)||
(mappedDesc.describe(modelFile.getContents(), null)==IContentDescriber.VALID)){
model = ToolClass.fetch(modelFile);
children = model.getComponents() ;
}
} catch (IOException e) {
ToolPlugin.showError("Error in CDF conten provider", e);
} catch (CoreException e) {
ToolPlugin.showError("Error in CDF conten provider", e);
}
}
} else if (parentElement instanceof ToolClass){
ToolComponent model = (ToolComponent)parentElement;
children = model.getComponents();
}
return children != null ? children : NO_CHILDREN;
}