Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse relative indentation with classes inherited from the namespace
Eclipse relative indentation with classes inherited from the namespace [message #753955] Mon, 31 October 2011 07:47
Alexander Tumin is currently offline Alexander TuminFriend
Messages: 3
Registered: October 2011
Junior Member
Hello, i am trying to make Eclipse-CDT (Indigo) to indent C++ class methods relativly to public/protected/private keywords; but expecting some troubles with classes which are inherited from some namespace; here is an illustration:
// some namespaced class
namespace BarSpace {
    class Bar {

    };
}

// as it indented by eclipse:
class Foo1 : public BarSpace::Bar {
    public:
    void foo();
};


As you see - eclipse indenting foo() method wrong; not relativly to public: keywrod. I've played a bit and found out that it is happens only when Foo* class inherited from namespaced class and so; such workaround may work:

// workaround:
using namespace BarSpace;
class Foo2 : public Bar {
    public:
        void foo();
};


Only i don't want to pollute namespaces with my constructs. I want to have both relative indentation and namespaced inheritance at the same time; like follows:

// as i want it to be indented:
class Foo3 : public BarSpace::Bar {
    public:
        void foo();
};


How can i configure Eclipse to work as i want? Thanks.

// here should be link to my stack overflow question, but seems like i can't post it :P ID of this question is 7950787
Previous Topic:"Type could not be resolved" Error
Next Topic:head less compilation using .cproject configuration
Goto Forum:
  


Current Time: Thu Apr 25 16:10:08 GMT 2024

Powered by FUDForum. Page generated in 0.02328 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top