Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346420

Summary: invalid added include position if pragma once is used.
Product: [Tools] CDT Reporter: Vasiliy Dybala <dibalavs>
Component: cdt-editorAssignee: Project Inbox <cdt-editor-inbox>
Status: RESOLVED WORKSFORME QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif, zeratul976
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Vasiliy Dybala CLA 2011-05-19 07:31:36 EDT
1. create new c++ project
2. create file test.h with content:
/*
 * header comment
 */

#pragma once

void t()
{
	printf("tst");
}

3. Move cursor to function printf and choose source\add Include.
include line will be added at first line, before #pragma once directive and befor file header comment.


-- Configuration Details --
Product: Eclipse 1.4.0.20110319-2300 (org.eclipse.epp.package.cpp.product)
Installed Features:
 org.eclipse.platform 3.7.0.r20110302-9gF7SHCIFt6ms-lIjrC6vK_XO-IabJMKu
Comment 1 Nathan Ridge CLA 2015-12-15 21:37:08 EST
This is working fine for me with CDT 8.8.1. The include line is added after the #pragma once.
Comment 2 Nathan Ridge CLA 2016-12-29 01:08:58 EST
Closing per comment 1. Feel free to reopen if you're still seeing this.