public DGGenerator(ProjectDocGenerator projectGenerator, T source, String templateName) { this( projectGenerator, source, templateName, source.getFullyQualifiedName(), nameForObjectNoExt(source, projectGenerator.getRepository()), null); }
public static String screenshotName(FlexoModelObject o, ProjectDocGenerator pdg) { FlexoCopiedResource r = pdg.getScreenshot(o); if (r != null) { return CGSymbolicDirectory.FIGURES + "/" + r.getFile().getName().substring(0, r.getFile().getName().length() - 4); } else { return CGSymbolicDirectory.FIGURES + "/" + "GenerateScreenshot"; } }
public static Icon screenshot(FlexoModelObject o, ProjectDocGenerator pdg) { FlexoCopiedResource r = pdg.getScreenshot(o); if (r != null) { if (r.getFile().exists()) { return new ImageIcon(r.getFile().getAbsolutePath()); } else { if (r.getResourceToCopy() != null) { return new ImageIcon(r.getResourceToCopy().getFile().getAbsolutePath()); } } } return new ImageIcon(o.getProject().getScreenshotResource(o, true).getFile().getAbsolutePath()); }