Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] How to add comments and one more issue
  • From: Ming Cheng <chengm349@xxxxxxxxxxx>
  • Date: Fri, 29 Nov 2019 04:19:33 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j/7TzWzz0GraKOFrLEJ/Dn7JotQiHkfkSUc9CBepyjE=; b=kmrlHdxwQytb3mMntgw2h8dB/7TP14dd30pLrp7byjJL/mnP8XAHxojS01i39pCIRlUK6PteWaN0a7zkrm2nqgRr3UufPsrmBr3nMWTSlWVCMGMFEnmCI4O8B1412i8dIa0+Na5dIwrcMx37MS/e5Hts7kW0DwzK7JdJdUH5anlxEWjnDAP9bvRIUV3u+dWlNYveVOvf9WfgBzzkV5UfJ2Hkak9e+w75POxQq/xlAEd317VTKVTqV6EJwMEbETKUaKZJITkBTqCa8nSMK2K2rFxTm8zn3kkPXGdci7PmLaJ93DYPgPUu1d15Yj56XH5pMw8kDNWx/4W2DL3hL4zL3Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UR0x13tlkqMU0I/g4mpvCbOpIidEAHbJvPYF0fF4u2RFgMfMutGz7aO2CY4+OPiBwhgzfllpSnAWv07TUQQ6p9X5ll2uVO6ATGW0XfuAt/aVYj3QByYAChAKSal7GGq/dvY7YQpAH3CkiooneECViOOtZb2aPnkKBkCd70oNIuAly2UhTa/hvM71asIirICnGShx/SmiupcXrLut0pXFfz0+rIDw2kTXKamn1XIOiY7wQdU47M67NGMi5srC7vVucos0PMhAB4Q3RnFUtw9KYVPNyPHv4zfHbuCCUq2Un2ex+tBt3+3eqhUTZQHPQlgCIlBmSvbcjJB3FUvjHTW4Cg==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/cdt-dev>
  • List-help: <mailto:cdt-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHVpmtB8mCScUQrnUqeNjZMd1DicA==
  • Thread-topic: How to add comments and one more issue

Hi,

 

How to add “//” and “/* … */” style comments into a ITranslatorUnit?

 

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.

 

Rgds.

Sent from Mail for Windows 10

 


Back to the top