// repository.getPath(),
// new TestTransformerMetaFactory(),
// new DefaultJDOMFactory(), false);
// IResource resource = new MockFile(
// deviceRAM.getDeviceRepositoryName());
IResource resource = new MockFile(repository.getPath());
// Create a tree for the dialog.
LPDMODOMFactory factory = new LPDMODOMFactory();
// Create first subtree
Element parent1 = factory.element("parent1");
Element child1a = factory.element("child1a");
child1a.setAttribute("attr1", "value1");
child1a.setAttribute("attr2", "value2");
Element child1b = factory.element("child1b");
parent1.addContent(child1a);
parent1.addContent(child1b);
// Create second subtree
Element parent2 = factory.element("parent2");
parent2.setAttribute("attr1", "value1");
parent2.setAttribute("attr2", "value2");
parent2.setAttribute("attr3", "value3");
parent2.setAttribute("attr4", "value4");
Element child2a = factory.element("child2a");
Element child2b = factory.element("child2b");
parent2.addContent(child2a);
parent2.addContent(child2b);
// Create the root element and add content
Element rootNode = factory.element("root");
rootNode.addContent(parent1);
rootNode.addContent(parent2);
XPath rootPath = new XPath(rootNode);
XPath parent1Path = new XPath(parent1);
XPath child1aPath = new XPath(child1a);
XPath child1bPath = new XPath(child1b);
XPath parent2Path = new XPath(parent2);
XPath child2aPath = new XPath(child2a);
XPath child2bPath = new XPath(child2b);
IMarker marker0 = resource.createMarker(IMarker.PROBLEM);
marker0.setAttribute(XPath.class.getName(),
rootPath.getExternalForm());
marker0.setAttribute(Element.class.getName(), rootNode.getName());
IMarker marker1 = resource.createMarker(IMarker.PROBLEM);
marker1.setAttribute(XPath.class.getName(),
parent1Path.getExternalForm());
marker1.setAttribute(Element.class.getName(), rootNode.getName());
IMarker marker2 = resource.createMarker(IMarker.PROBLEM);
marker2.setAttribute(XPath.class.getName(),
child1aPath.getExternalForm());
marker2.setAttribute(Element.class.getName(), child1a.getName());
IMarker marker3 = resource.createMarker(IMarker.PROBLEM);
marker3.setAttribute(XPath.class.getName(),
child1bPath.getExternalForm());
marker3.setAttribute(Element.class.getName(), child1b.getName());
IMarker marker4 = resource.createMarker(IMarker.PROBLEM);
marker4.setAttribute(XPath.class.getName(),
parent2Path.getExternalForm());
marker4.setAttribute(Element.class.getName(), parent2.getName());
IMarker marker5 = resource.createMarker(IMarker.PROBLEM);
marker5.setAttribute(XPath.class.getName(),
child2aPath.getExternalForm());
marker5.setAttribute(Element.class.getName(), parent2.getName());
IMarker marker6 = resource.createMarker(IMarker.PROBLEM);
marker6.setAttribute(XPath.class.getName(),
child2bPath.getExternalForm());
marker6.setAttribute(Element.class.getName(), parent2.getName());
// Find markers associated with parent2