File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class DotManager
3636 static DotManager *instance ();
3737 void addJob (const DotJob &newJob);
3838 DotFilePatcher *createFilePatcher (const QCString &fileName);
39+ bool needToRun () const { return m_jobs.size ()+m_filePatchers.size ()>0 ; }
3940 bool run ();
4041
4142 private:
Original file line number Diff line number Diff line change @@ -13418,15 +13418,21 @@ void generateOutput()
1341813418 g_s.end ();
1341913419 }
1342013420
13421- g_s.begin (" Running plantuml with JAVA...\n " );
13422- PlantumlManager::instance ().run ();
13423- g_s.end ();
13421+ if (PlantumlManager::instance ().needToRun ())
13422+ {
13423+ g_s.begin (" Running plantuml with JAVA...\n " );
13424+ PlantumlManager::instance ().run ();
13425+ g_s.end ();
13426+ }
1342413427
13425- g_s.begin (" Running mermaid (mmdc)...\n " );
13426- MermaidManager::instance ().run ();
13427- g_s.end ();
13428+ if (MermaidManager::instance ().needToRun ())
13429+ {
13430+ g_s.begin (" Running mermaid (mmdc)...\n " );
13431+ MermaidManager::instance ().run ();
13432+ g_s.end ();
13433+ }
1342813434
13429- if (Config_getBool (HAVE_DOT ))
13435+ if (Config_getBool (HAVE_DOT ) && DotManager::instance ()-> needToRun () )
1343013436 {
1343113437 g_s.begin (" Running dot...\n " );
1343213438 DotManager::instance ()->run ();
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class MermaidManager
4848
4949 void setHasInlineDiagrams ();
5050 bool hasInlineDiagrams () const { return m_hasInlineDiagrams; }
51+ bool needToRun () const { return !m_diagrams.empty (); }
5152
5253 /* * Run mmdc tool for all collected diagrams */
5354 void run ();
Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ class PlantumlManager
4545
4646 static PlantumlManager &instance ();
4747
48+ bool needToRun () const
49+ {
50+ return !m_pngPlantumlContent.empty () ||
51+ !m_svgPlantumlContent.empty () ||
52+ !m_epsPlantumlContent.empty ();
53+ }
54+
4855 /* * Run plant UML tool for all images */
4956 void run ();
5057
You can’t perform that action at this time.
0 commit comments