Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346420 - invalid added include position if pragma once is used.
Summary: invalid added include position if pragma once is used.
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 07:31 EDT by Vasiliy Dybala CLA
Modified: 2016-12-29 01:08 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.