Bug 491638 - Organize Includes always use relative path
Summary: Organize Includes always use relative path
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 9.0.0   Edit
Hardware: PC Windows 7
: P3 major with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-13 21:50 EDT by Julien Lavergne CLA
Modified: 2020-09-04 15:23 EDT (History)
2 users (show)

See Also:


Attachments
Example Eclipse C++ project demonstrating the problem (6.44 KB, application/zip)
2017-04-26 04:45 EDT, Notify Me CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Lavergne CLA 2016-04-13 21:50:02 EDT
Hi,


I recently updated CDT on 9.0.0 and now the organize includes feature always use relative paths. It was not the case few weeks ago on 9.0.0.
I am not sure though which commit broke it.

The feature is not usable anymore for me at this moment.

My project include paths and symbols have not changed since. Include Style are all configured to "Keep include statements together" and "Use angle brackets". "Use path relative to the including file" is disabled.

I have subfolders in my include/ folder and using Organize Includes on a header in one of the subfolder insert includes to parent directory headers with relative paths.

On top of reporting this issue, I am also asking what more I could check in order to verify that it is indeed a bug and not a configuration problem in my environment.
Comment 1 Sergey Prigogin CLA 2016-04-13 22:27:28 EDT
A small self-contained project reproducing the problem would be very helpful.
Comment 2 Notify Me CLA 2017-04-26 04:45:23 EDT
Created attachment 267998 [details]
Example Eclipse C++ project demonstrating the problem

This problem still exists and is very annoying!

I added a test project that reproduces the problem.
It has the following classes:
- TestIncludeeA
- Level1Folder/TestIncludeeB
- Path/To/Class/Deepdownbelow/TestIncluder

The TestIncluder includes the TestIncludeeA and B, which are several folders up in the project tree. The includes generated by eclipse, even though all "relative path" options were NOT ticked, look like the following. Definitely not absolute paths:

#include "../../../../Level1Folder/TestIncludeeB.h"
#include "../../../../TestIncludeeA.h"


I hope this helps fixing the problem.



Installed versions:
------------------------
CDT 9.2.1.201703062208
Eclipse Platform 4.6.3.M20170301-0400