Service Layer for IDE Integration of C/C++ Preprocessor Related Analysis


Software development in C/C++ languages is tightly coupled with preprocessor directives. While the use of preprocessor constructs cannot be avoided, current IDE support for developers can still be improved. Early feedback from IDEs about misused macros or conditional compilation has positive effects on developer productivity and code quality as well. In this paper we introduce a service layer for the Visual Studio to make detailed preprocessor information accessible for any type of IDE extensions. The service layer is built upon our previous work on the analysis of directives. We wrap the analyzer tool and provide its functionality through an API. We present the public interface of the service and demonstrate the provided services through small plug-ins implemented using various extension mechanisms. These plug-ins work together to aid the daily work of developers in several ways. We provide (1) an editor extension through the Managed Extensibility Framework which provides macro highlighting within the source code editor; (2) detailed information about actual macro substitutions and an alternative code view to show the results of macro calls; (3) a managed package for discovering the intermediate steps of macro replacements through a macro explorer. The purpose of this work is twofold: we present an additional layer designed to aid the work of tool developers; second, we provide directly usable IDE components to express its potentials.

Proceedings of the 14th International Conference on Computational Science and Its Applications (ICCSA 2014), Guimarães, Portugal, undefined


    author    = {D\'evai, Rich\'ard and Vid\'acs, L\'aszl\'o and Ferenc, Rudolf and Gyim\'othy, Tibor},
    title     = {Service Layer for {IDE} Integration of {C/C++} Preprocessor Related Analysis},
    booktitle = {Proceedings of the 14th International Conference on Computational Science and Its Applications (ICCSA 2014)},
    year      = {2014},
    volume    = {8583},
    series    = {Lecture Notes in Computer Science (LNCS)},
    address   = {Guimar{\~a}es, Portugal},
    month     = jun,
    publisher = {Springer-Verlag},
    doi       = {10.1007/978-3-319-09156-3_29},
    url       = {},