*/
public Object[] getChildren(Object parentElement) {
List<TreeNode> children = null;
if (parentElement instanceof ProblemsViewRoot) {
ProblemsViewRoot root = (ProblemsViewRoot) parentElement;
if (root.getChildren().isEmpty()) {
SchemaChecker schemaChecker = Activator.getDefault()
.getSchemaChecker();
if (schemaChecker != null) {
List<SchemaError> errors = schemaChecker.getErrors();
if (!errors.isEmpty()) {
Folder errorsFolder = new Folder(FolderType.ERROR, root);
root.addChild(errorsFolder);
for (SchemaError error : errors) {
errorsFolder.addChild(new SchemaErrorWrapper(error,
errorsFolder));
}
}
List<SchemaWarning> warnings = schemaChecker.getWarnings();
if (!warnings.isEmpty()) {
Folder warningsFolder = new Folder(FolderType.WARNING,
root);
root.addChild(warningsFolder);
for (SchemaWarning warning : warnings) {
warningsFolder.addChild(new SchemaWarningWrapper(
warning, warningsFolder));
}
}
}
}
children = root.getChildren();
} else if (parentElement instanceof Folder) {
Folder folder = (Folder) parentElement;
children = folder.getChildren();
} else if (parentElement instanceof SchemaErrorWrapper) {