Many software systems need to be developed with adaptation in mind, where at runtime they need to detect changes in their operating environments and adapt themselves to cope with these changes while achieving or preserving the overall system goals. In recent years, there has been much research in the communities of context-aware systems and selfadaptive systems with their own foci. However, addressing context awareness and self-adaptation in a consistent and integrated manner remains a major challenge. In this paper, we introduce a novel approach to modeling and realizing such context-aware adaptive software systems. Our approach explicitly separates but relates the context model and the system model, so that their relationships, changes, and change impacts across the system and its contexts can be clearly captured and managed. In particular, we differentiate management context from operational context as to whether or not context changes cause system adaptation or not. To enable runtime changes to the system, its contexts, and their relationships, they all have their runtime representation, so that they can be manipulated and managed at runtime. Our component model realizing the approach directly supports interface definitions for context and management as well as functionality. Furthermore, we have developed a tool to generate the system implementations from their models and to test their context-aware adaptive behavior. We demonstrate our approach through the modeling and realization of a context-aware vehicle route planning system.