in svg/src/main/java/jetbrains/jetpad/projectional/svg/toAwt/SvgNodeMapperFactory.java [35:67]
public Mapper<? extends SvgNode, ? extends Node> createMapper(SvgNode source) {
Mapper<? extends SvgNode, ? extends Node> result;
if (source instanceof SvgEllipseElement) {
result = new SvgElementMapper<>((SvgEllipseElement) source, new SVGOMEllipseElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgCircleElement) {
result = new SvgElementMapper<>((SvgCircleElement) source, new SVGOMCircleElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgRectElement) {
result = new SvgElementMapper<>((SvgRectElement) source, new SVGOMRectElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgTextElement) {
result = new SvgElementMapper<>((SvgTextElement) source, new SVGOMTextElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgPathElement) {
result = new SvgElementMapper<>((SvgPathElement) source, new SVGOMPathElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgLineElement) {
result = new SvgElementMapper<>((SvgLineElement) source, new SVGOMLineElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgSvgElement) {
result = new SvgElementMapper<>((SvgSvgElement) source, new SVGOMSVGElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgGElement) {
result = new SvgElementMapper<>((SvgGElement) source, new SVGOMGElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgStyleElement) {
result = new SvgElementMapper<>((SvgStyleElement) source, new SVGOMStyleElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgTextNode) {
result = new SvgTextNodeMapper((SvgTextNode) source, myDoc.createTextNode(null), myDoc, myPeer);
} else if (source instanceof SvgTSpanElement) {
result = new SvgElementMapper<>((SvgTSpanElement) source, new SVGOMTSpanElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgDefsElement) {
result = new SvgElementMapper<>((SvgDefsElement) source, new SVGOMDefsElement(null, myDoc), myDoc, myPeer);
} else if (source instanceof SvgClipPathElement) {
result = new SvgElementMapper<>((SvgClipPathElement) source, new SVGOMClipPathElement(null, myDoc), myDoc, myPeer);
} else {
throw new IllegalStateException("Unsupported SvgElement");
}
return result;
}