Пример #1
0
 public DGGenerator(ProjectDocGenerator projectGenerator, T source, String templateName) {
   this(
       projectGenerator,
       source,
       templateName,
       source.getFullyQualifiedName(),
       nameForObjectNoExt(source, projectGenerator.getRepository()),
       null);
 }
Пример #2
0
 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";
   }
 }
Пример #3
0
 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());
 }