Skip to content

Commit 54d7fd9

Browse files
committed
Don't show message "Running <tool> ..." when there is nothing to run
1 parent fc0164e commit 54d7fd9

4 files changed

Lines changed: 22 additions & 7 deletions

File tree

src/dot.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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:

src/doxygen.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff 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();

src/mermaid.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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();

src/plantuml.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)