How to stop inserting same include stmt more than once [message #1817915] |
Tue, 03 December 2019 05:51 |
Ming Cheng Messages: 19 Registered: December 2019 |
Junior Member |
|
|
I don't know why the following code does not work as expected:
Void GenerateCPPSrc()
{
....
/*IInclude inc = tu.getInclude("QfixLogger.h");
JOptionPane.showMessageDialog( null, "1" );
if (false == inc.exists()) {
JOptionPane.showMessageDialog( null, "1.1" );
tu.createInclude("QfixLogger.h", false, null, monitor);
JOptionPane.showMessageDialog( null, "1.2" );
} else {
JOptionPane.showMessageDialog( null, "2" );
}*/
.....
}
If my file does not have QfixLogger.h, I can see 1, but no 1.1/1.2, neither 2.
If I don't do inc.exists() checking, and I call GenerateCPPSrc more than 1 time, then I can see several "#include "QfixLogger.h" " in my file.
|
|
|
Powered by
FUDForum. Page generated in 0.02660 seconds