Formatting with Ctrl+K-D

Sysprogs forums Forums VisualGDB Formatting with Ctrl+K-D

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9566
    Otatiaro
    Participant

    Hello,

    I’m used to the Visaul Studio automatic formatting using Ctrl+K-D, works like a charm when coding in C#.

    But using VisualGDB projects I get some messed up things:

    • Indentation for namespace (not usual for C++)
    • Doxygen comments (I’m trying Atomineer pro) are indented too
    • If I declare template parameters on a separate lines, the class declaration is indented also

     

    	/**
    				* Task with built in stack.
    				* @tparam	StackSize	Stack size in pointer size (32 bits).
    				* @sa	Task
    				*/
    		template<uint32_t StackSize> 
    			class TaskWithStack : public Task
    		{
    		public:
    
    							/**
    								* Creates a task with built in stack.
    								* @param	parameter	 	The parameter.
    								* @param	entry		 	The entry.
    								* @param	name		 	The name.
    								* @param	priority	 	The priority.
    								* @param	isPriviledged	True if this TaskWithStack is priviledged.
    								*/
    			TaskWithStack(const uint32_t parameter, const TaskEntry entry, const char* name, Priority priority, const bool isPriviledged)
    				: Task(m_stack, StackSize, parameter, entry, name, priority, isPriviledged)
    			{
    
    			}
    
    		private:
    			uint32_t m_stack[StackSize];
    		};
    
    	} /* namespace Kernel */
    } /* namespace Opsy */
    

    Where do I find options to change this behavior ?

    Thomas.

    #9567
    Otatiaro
    Participant

    Ho and by the way, Resharper++ compatibility is a MUST, I feel totally naked without it.

    Thomas.

    #9590
    support
    Keymaster

    Hi,

    VisualGDB usually preserves the comment indentation when reformatting the code. If it actually breaks them in your case, please let us know the exact repro steps (i.e. how the code looks before/after formatting what would you expect) and we will fix this.

    Most of the settings can be controlled via Tools->Options->Text Editor->C/C++ (e.g. Indentation -> Indent namespace contents). Formatting settings that are specific to VisualGDB can be controlled via Tools->Options->Text Editor->C/C++ (VisualGDB).

    Regarding Resharper, the problem is that Resharper does not know how to import VisualGDB-specific settings from VisualGDB projects and hence does not work correctly. The only solution we could offer is add features you miss to our Clang IntelliSense engine so that you can still have them for VisualGDB projects.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.