Presentation is loading. Please wait.

Presentation is loading. Please wait.

New Project Model Primary author: Mikhail Sennikovsky Contributors: Leo Treggiari Intel Corp. September, 2006.

Similar presentations


Presentation on theme: "New Project Model Primary author: Mikhail Sennikovsky Contributors: Leo Treggiari Intel Corp. September, 2006."— Presentation transcript:

1 New Project Model Primary author: Mikhail Sennikovsky Contributors: Leo Treggiari Intel Corp. September, 2006

2 Primary goals Multi-language support Multi-language support Language-specific settings Language-specific settings Usability, Configurability Usability, Configurability Provide a common UI and API interface with different project types in CDT Provide a common UI and API interface with different project types in CDT Automating the common project settings adjustment Automating the common project settings adjustment Core and Build System settings consistency Core and Build System settings consistency Consistent Integration Consistent Integration One consistent mechanism of tool integration in both Standard and Managed make One consistent mechanism of tool integration in both Standard and Managed make

3 Agenda Requirements Requirements New Project Model overview New Project Model overview Backward Compatibility Backward Compatibility

4 Requirements Core Requirements Core Requirements Build System Requirements Build System Requirements

5 Core requirements Multi-language support Multi-language support The ability to map one and the same content type to different languages. The ability to map one and the same content type to different languages. Mixed Language project support: Mixed Language project support: Includes/Macros settings should be per-language. Includes/Macros settings should be per-language. It should be possible to assign different language settings for different folders/files. It should be possible to assign different language settings for different folders/files. Configurability and settings consistency Configurability and settings consistency Configuration Concept Configuration Concept Unified build system independent programming and UI interface for the common project settings. Unified build system independent programming and UI interface for the common project settings. Core and Build settings consistency Core and Build settings consistency Project settings automatic adjustment Project settings automatic adjustment Project creation Project creation Project references Project references External SDKs External SDKs

6 Build System requirements Multi-language support Multi-language support Associating language with tool InputType Associating language with tool InputType Per-language/tool Includes/Macros calculation Per-language/tool Includes/Macros calculation Configurability Configurability Standard and Managed Build System incorporation Standard and Managed Build System incorporation Tool-chain modifications (changing Tool-chain, tools, builder) Tool-chain modifications (changing Tool-chain, tools, builder) Per-folder settings Per-folder settings Dynamically adding extension tool-chain information during eclipse/CDT session Dynamically adding extension tool-chain information during eclipse/CDT session One consistent way of tool integration One consistent way of tool integration Standard and Managed Build System incorporation Standard and Managed Build System incorporation

7 New Project Model Core Project Model Core Project Model CDT Build System CDT Build System

8 Core Project Model Project Representation Model (CModel) Reflects how the project settings are applied to the project resource tree. Project Settings Model Represents the project settings CProjectDescription 1. Configuration info 2. Configuration settings Build System CConfiguration 1. Source information 2. Binary information Binary Parsers Source Parser Project tree

9 Project Settings Model One consistent interface for Project settings One consistent interface for Project settings Replaces the current ICOwner/ICDescriptor and PathEntry mechanisms Replaces the current ICOwner/ICDescriptor and PathEntry mechanisms Provides common interface to the Build System Provides common interface to the Build System New CConfigurationDataProvider extension point New CConfigurationDataProvider extension point Tightly connected with the CModel Tightly connected with the CModel Each CProject has associated CProjectDescription Each CProject has associated CProjectDescription CProjectDescription will have one or more CConfigurationDescription CProjectDescription will have one or more CConfigurationDescription

10 Accessing the Project Settings Accessed via the CoreModel.getDescription(IProject) Accessed via the CoreModel.getDescription(IProject) Applied via CoreModel.setProjectDescription( ICProjectDescription) Applied via CoreModel.setProjectDescription( ICProjectDescription) allows making multiple (any number of) changes to the project settings before they get applied. allows making multiple (any number of) changes to the project settings before they get applied. allows rejecting the changes allows rejecting the changes avoids race conditions avoids race conditions Settings changes notified via a CElementChangeListener mechanism. Notifications performed only after the settings get applied Settings changes notified via a CElementChangeListener mechanism. Notifications performed only after the settings get applied

11 Project Settings Infrastructure Build System Settings Build System Settings Determine the build behavior Determine the build behavior E.g. Includes, Macros, Libraries, Language settings, Build Environment, etc E.g. Includes, Macros, Libraries, Language settings, Build Environment, etc Maintained by the Build System Maintained by the Build System Project-specific settings Project-specific settings May and usually do influence the Build System settings, but are not themselves the Build System settings May and usually do influence the Build System settings, but are not themselves the Build System settings Configuration settings (Set of configurations, active configuration), Build System, Project dependencies, Referenced projects/configurations, External SDKs, Export settings, etc. Configuration settings (Set of configurations, active configuration), Build System, Project dependencies, Referenced projects/configurations, External SDKs, Export settings, etc. Maintained by the Core Maintained by the Core

12 Build System Settings Language settings Language settings Source resource type info (ContentType or file extension) Source resource type info (ContentType or file extension) Language ID Language ID Includes resource type info (ContentType or file extension) Includes resource type info (ContentType or file extension) Includes Includes Macros Macros TODO?? Where the pre-build PDOM info should reside? TODO?? Where the pre-build PDOM info should reside? Libraries Libraries Build process settings Build process settings Current Builder Directory Current Builder Directory OutputFolders OutputFolders Build Environment Build Environment Error parser IDs Error parser IDs Target Artifact(s) settings Target Artifact(s) settings Target goal name, Target goal name, Target goal location Target goal location Target goal type Target goal type Source settings Source settings Build Variable (Macros) settings Build Variable (Macros) settings Target Platform settings Target Platform settings Target platform name(s) Target platform name(s) Target OS name(s) Target OS name(s) Binary parser settings Binary parser settings

13 Project-specific settings Configuration settings Configuration settings Set of configurations Set of configurations Active configuration Active configuration Dependencies settings Dependencies settings Referenced projects/configurations Referenced projects/configurations External SDKs External SDKs Export settings Export settings

14 CProject Description schema CProjectDescription CProjectDescription SourceEntry[] SourceEntry[] CConfigurationDescription[] CConfigurationDescription[] CFolderDescription[] (Folder path, Exclusion filter[], “exclude from build” status) CFolderDescription[] (Folder path, Exclusion filter[], “exclude from build” status) CLanguageSetting[] (Source and Header ContentType or file extensions, LanguageId) CLanguageSetting[] (Source and Header ContentType or file extensions, LanguageId) ILanguagePathEntry[](IncludeEntry[], IncludeFileEntry[], MacroEntry[], MacroFileEntry[],LibraryEntry[], LibraryPathEntry[])) ILanguagePathEntry[](IncludeEntry[], IncludeFileEntry[], MacroEntry[], MacroFileEntry[],LibraryEntry[], LibraryPathEntry[])) External SDK ID[] External SDK ID[] CFileDescription[] (File path, “Exclude from build” status) CFileDescription[] (File path, “Exclude from build” status) CLanguageSetting[] CLanguageSetting[] (same as above) (same as above) External SDK ID[] External SDK ID[] CBuilderSetting CBuilderSetting OutputEntry[] OutputEntry[] Builder CWD Builder CWD Environment Environment Error Parser information Error Parser information CTargetPlatformSetting CTargetPlatformSetting TargetPlatformName[] TargetPlatformName[] TargetOSName[] TargetOSName[] BinaryParserId[] BinaryParserId[] CTargetArtifactSetting[] CTargetArtifactSetting[] Target Goal Name Target Goal Name Target Goal Location Target Goal Location Target Goal Type Target Goal Type BuildMacroSupplier BuildMacroSupplier Referenced Configurations Info [] Referenced Configurations Info [] BuildSystem ID BuildSystem ID

15 Interfacing with the Build System CConfigurationDataProvider CConfigurationDataProvider ConfigurationData creation ConfigurationData creation CConfigurationData CConfigurationData Interface to the Build System Interface to the Build System Sub-set of the Project Settings Model representing the Build System Settings Sub-set of the Project Settings Model representing the Build System Settings Project Settings Model (CProjectDescription) Build System Build System Settings Build System Common Interface (CConfigurationData) (CConfigurationDataProvider extension point) Project Settings Model clients Build System Settings Project-specific settings

16 CConfigurationData schema CConfigurationData CConfigurationData CFolderData[] (Folder path, Exclusion filter[], “exclude from build” status) CFolderData[] (Folder path, Exclusion filter[], “exclude from build” status) CLanguageData[] (Source and Header ContentType or file extensions, LanguageId) CLanguageData[] (Source and Header ContentType or file extensions, LanguageId) ILanguagePathEntry[](IncludeEntry[], IncludeFileEntry[], MacroEntry[], MacroFileEntry[], LibraryEntry[], LibraryPathEntry[]) ILanguagePathEntry[](IncludeEntry[], IncludeFileEntry[], MacroEntry[], MacroFileEntry[], LibraryEntry[], LibraryPathEntry[]) CFileData[](File path, “Exclude from build” status, CLanguageData[]) CFileData[](File path, “Exclude from build” status, CLanguageData[]) … (same as above) … (same as above) CBuilderSetting CBuilderSetting OutputEntry[] OutputEntry[] Builder CWD Builder CWD Environment Environment Error Parser information Error Parser information CTargetPlatformSetting CTargetPlatformSetting TargetPlatformName[] TargetPlatformName[] TargetOSName[] TargetOSName[] BinaryParserId[] BinaryParserId[] CTargetArtifactSetting[] CTargetArtifactSetting[] Target Goal Name Target Goal Name Target Goal Location Target Goal Location Target Goal Type Target Goal Type BuildMacroSupplier BuildMacroSupplier

17 ProjectDescriptionManager Settings Data management CProjectDescription (proxy, uses data cached by the Description Manager) ProjectDescriptionManager CProjectDescription (cached data) getProjectDescription() get* requests CProjectDescription (uses “live” CConfigurationData values) CProjectDescription (cached data) set* requests CConfigurationData CConfigurationDataProvider createConfiguration() getProjectDescription() Project Settings are cached by the core Project Settings are cached by the core CProjectDescription works with cached data until first set* request CProjectDescription works with cached data until first set* request On first set* request CConfigurationData is created, CProjectDescription works with “live” CConfigurationData values On first set* request CConfigurationData is created, CProjectDescription works with “live” CConfigurationData values When the CProjectDescription gets applied the CConfigurationData is cached When the CProjectDescription gets applied the CConfigurationData is cached

18 Setting Data Persistence The Core (CProjectDescriptionManager) is responsible for loading/holding/storing the Project-specific Settings part of the Project Settings Model. The Core (CProjectDescriptionManager) is responsible for loading/holding/storing the Project-specific Settings part of the Project Settings Model. Stored in the.cproject file Stored in the.cproject file The Build System is responsible for loading/holding/storing the Build System Settings part of the Project Settings Model. The Build System is responsible for loading/holding/storing the Build System Settings part of the Project Settings Model. Build System-specific persistence logic Build System-specific persistence logic Core Project Description provides an API for storing the custom data to the.cproject file Core Project Description provides an API for storing the custom data to the.cproject file The Build System Settings and the Project-specific Settings will be loaded in one step The Build System Settings and the Project-specific Settings will be loaded in one step The CProjectDescriptionManager could store the cached data and compare it against the Build System data on startup The CProjectDescriptionManager could store the cached data and compare it against the Build System data on startup Build System settings are change detection Build System settings are change detection

19 Configuration concept adoption PDOM PDOM Configuration concept is not supported Configuration concept is not supported It will be possible to select configuration to be used for indexing – “index” configuration It will be possible to select configuration to be used for indexing – “index” configuration CModel CModel Configuration concept is not supported Configuration concept is not supported The “index” configuration information will be used for CModel calculation The “index” configuration information will be used for CModel calculation

20 New Project Model: Build System

21 Build System requirements Multi-language support Multi-language support Associating language with tool InputType Associating language with tool InputType Per-language/tool Includes/Macros calculation Per-language/tool Includes/Macros calculation Configurability Configurability Standard and Managed Build System incorporation Standard and Managed Build System incorporation Tool-chain modifications (changing Tool-chain, tools, builder) Tool-chain modifications (changing Tool-chain, tools, builder) Per-folder settings Per-folder settings Dynamically adding extension tool-chain information during eclipse/CDT session Dynamically adding extension tool-chain information during eclipse/CDT session One consistent way of tool integration One consistent way of tool integration Standard and Managed Build System incorporation Standard and Managed Build System incorporation

22 Build System Enhancements Standard and Managed Build System incorporation Standard and Managed Build System incorporation Tool-chain modification Tool-chain modification Real Tools Real Tools Build Properties Build Properties Language settings Language settings Per-Folder Settings Per-Folder Settings Dynamic extension elements providing Dynamic extension elements providing Integration with the New Core Project Model Integration with the New Core Project Model Internal Builder integration Internal Builder integration

23 “Standard” and “Managed” incorporation One Build System implemented in two plug-ins One Build System implemented in two plug-ins org.eclipse.cdt.build.core org.eclipse.cdt.build.core org.eclipse.cdt.build.ui org.eclipse.cdt.build.ui One CConfigurationDataProvider extension point contribution One CConfigurationDataProvider extension point contribution org.eclipse.cdt.managedbuilder.* and org.eclipse.cdt.make.* plugins are removed org.eclipse.cdt.managedbuilder.* and org.eclipse.cdt.make.* plugins are removed The Build functionality will function in several modes: The Build functionality will function in several modes: Build flow/logic is defined by the user-written makefile Build flow/logic is defined by the user-written makefile Project Build Project Build Make Target Build Make Target Build Build flow/logic is calculated automatically based upon the Build System settings Build flow/logic is calculated automatically based upon the Build System settings Buildfile is generated and External Builder is used Buildfile is generated and External Builder is used Project Build Project Build Internal Builder is used Internal Builder is used Project Build Project Build Selected resources build Selected resources build Tool-chain functionality Tool-chain functionality Build Logic (“Managed” build mode only) Build Logic (“Managed” build mode only) Settings grouping/adjustment Settings grouping/adjustment extended buildDefinition ext.point extended buildDefinition ext.point one common mechanism for tool integration one common mechanism for tool integration ScannerDiscoveryProfile ext.point ScannerDiscoveryProfile ext.point Makefile parsing functionality Makefile parsing functionality IMakeBuilderInfo mechanism IMakeBuilderInfo mechanism Building selected files (“Managed” build mode only) Building selected files (“Managed” build mode only) Building specified target (“Managed” build mode only) Building specified target (“Managed” build mode only)

24 Incorporation benefits for “Standard” and “Managed” Both Both One consistent way of tool integration One consistent way of tool integration Common Program and UI interfaces Common Program and UI interfaces Easy maintenance Easy maintenance Standard make Standard make Tool-chain concept Tool-chain concept Settings grouping/adjustment Settings grouping/adjustment Managed make Managed make IMakeBuilderInfo mechanism in Managed Build IMakeBuilderInfo mechanism in Managed Build Correct handling of Building selected files Correct handling of Building selected files

25 Build mode specific functionality “Managed”-specific functionality “Managed”-specific functionality Buildfile generation Buildfile generation Internal Builder Internal Builder Building selected files Building selected files “Standard”-specific functionality “Standard”-specific functionality Building specified target Building specified target MakeTargetBuilder extension point MakeTargetBuilder extension point

26 Tool-chain modification Supported modifications Supported modifications Tool-chain substitution Tool-chain substitution Tool list modification Tool list modification Builder substitution Builder substitution Settings preserved when possible Settings preserved when possible Option values Option values Converter mechanism Converter mechanism Build properties Build properties Values for specific option types (Includes, Macros, Libraries) Values for specific option types (Includes, Macros, Libraries) Settings adjusted Settings adjusted Environment Environment environmentSuplier on tool and builder levels environmentSuplier on tool and builder levels Error parsers Error parsers Installation support information Installation support information isSupported call-back on tool and builder levels isSupported call-back on tool and builder levels Includes/macros calculation Includes/macros calculation Scanner discovery profile on tool level Scanner discovery profile on tool level Language information Language information Language ID on InputType level Language ID on InputType level

27 “Real” tools The “Real” concept is applicable for tool-chains, tools and builders The “Real” concept is applicable for tool-chains, tools and builders “Real” tool/builder - Regular extension tool/builder definition representing an external tool. “Real” tool/builder - Regular extension tool/builder definition representing an external tool. Used for: Used for: Obtaining the set of supported tools/builders Obtaining the set of supported tools/builders Tool-chain modifications Tool-chain modifications Determined via Determined via isReal tool attribute isReal tool attribute Automatically Automatically “Real” tool-chain – represents the unique tool-chain “Real” tool-chain – represents the unique tool-chain Used for: Used for: Obtaining the set of supported tool-chains Obtaining the set of supported tool-chains Tool-chain substitution Tool-chain substitution Determined via Determined via isReal tool attribute isReal tool attribute Automatically Automatically

28 Build Properties Property definition Property definition property ID property ID human-readable property name human-readable property name Extendible set of values the property supports Extendible set of values the property supports Property-value pairs are associated with the configurations Property-value pairs are associated with the configurations Tools and tool-chains specify the supported properties and vales Tools and tool-chains specify the supported properties and vales Option enablement expressions used for adjusting tool settings based upon the Build Property values Option enablement expressions used for adjusting tool settings based upon the Build Property values The Build System pre-defines some common general properties The Build System pre-defines some common general properties Artifact Type Artifact Type Executable Executable Static Library Static Library Shared Library Shared Library Build Type Build Type Debug Debug Release Release

29 Multi-language support Language ID on InputType level Language ID on InputType level Static Language ID association (via attribute) Static Language ID association (via attribute) Dynamic language ID calculation Dynamic language ID calculation call-back call-back Build Variables(Macros) Build Variables(Macros) Option enablement expression Option enablement expression Per-InputType/Tool Path entry info calculation Per-InputType/Tool Path entry info calculation Includes Includes Macros Macros Libraries Libraries Per-InputType Scanner Discovery Profile Per-InputType Scanner Discovery Profile

30 Per-Folder Settings FolderConfiguration element – folder settings container FolderConfiguration element – folder settings container Contains Tool-Chain Contains Tool-Chain Some Tool-chain information is ignored Some Tool-chain information is ignored Builder setings Builder setings The tool “conflicting” with the “target artifact” producer tool The tool “conflicting” with the “target artifact” producer tool InputTypes of the tool and the “target artifact” tool refer to the same file type (content type or file extension) InputTypes of the tool and the “target artifact” tool refer to the same file type (content type or file extension) The tool “conflicting” with the tool with the “multiple of type” primary input type defined at the project level. The tool “conflicting” with the tool with the “multiple of type” primary input type defined at the project level.

31 Dynamic extension elements providing Dynamic element provider. 1.Dynamic element info maintenance CDT Build System Extension element in-memory registry Data source Public API to get/set extension elements API for providing the data source, e.g. file location buildDefinitions ext. point 1.dynamicElementProvider 2.buildDefinitionStartup Custom functionalityBuild System functionality Dynamic element provider responsible for maintaining dynamically added info Dynamic element provider responsible for maintaining dynamically added info adding an extension element information during Eclipse/CDT session adding an extension element information during Eclipse/CDT session loading the dynamically added extension information on startup. loading the dynamically added extension information on startup.

32 Integration with the New Core Project Model One CConfigurationDataProvider extension contributed One CConfigurationDataProvider extension contributed Build System Information is stored within the tool-chain Build System Information is stored within the tool-chain If no tool-chain is associated with the configuration (“Standard” make mode), the dummy tool-chain is created to maintain the settings If no tool-chain is associated with the configuration (“Standard” make mode), the dummy tool-chain is created to maintain the settings

33 Internal Builder Integration Integration Internal Builder will be presented as a Builder object of the buildDefinitions schema Internal Builder will be presented as a Builder object of the buildDefinitions schema Tool-integrators will be able to use the Internal Builder in their tool-chain integrations Tool-integrators will be able to use the Internal Builder in their tool-chain integrations Switching on/off the Internal Builder will be implemented internally as Builder substitution Switching on/off the Internal Builder will be implemented internally as Builder substitution Current issues Current issues Dependency tracking Dependency tracking

34 Backward Compatibility Core Core Build System Build System

35 Core Backward Compatibility Extension points and API will be deprecated by the new CConfigurationDataProvider extension point/CProjectDescription API: Extension points and API will be deprecated by the new CConfigurationDataProvider extension point/CProjectDescription API: CDescriptor CDescriptor API API CProject extension point(COwner) CProject extension point(COwner) PathEntry PathEntry API API PathEntryPathEntryStore extension point PathEntryPathEntryStore extension point PathEntryContainerInitializer extension point PathEntryContainerInitializer extension point Deprecated functionality could be supported, but removed in the future (e.g. post-4.0) Deprecated functionality could be supported, but removed in the future (e.g. post-4.0) Question: do we need to support deprecated functionality?

36 Build System Backward Compatibility Existing projects support, provided that the tool definitions are updated to 4.0 (required) Existing projects support, provided that the tool definitions are updated to 4.0 (required) Existing integrations support (as much as possible) Existing integrations support (as much as possible)

37 Existing project support 4.0 tool-chain integration must be available 4.0 tool-chain integration must be available If converter is provided converter is used, otherwise project elements refer to 4.0 extension elements of the same IDs as specified in the.cdtbuild file If converter is provided converter is used, otherwise project elements refer to 4.0 extension elements of the same IDs as specified in the.cdtbuild file Conversion is initiated once the project data gets loaded Conversion is initiated once the project data gets loaded The user is notified that the project has to be updated. The user is notified that the project has to be updated. The user will be asked to either accept or reject the project conversion. The user will be asked to either accept or reject the project conversion. In case the user accepts the project conversion, the project data is converted to the 4.0 format. After the conversion is performed, it is not be possible to load the project data using the older versions of the CDT. In case the user accepts the project conversion, the project data is converted to the 4.0 format. After the conversion is performed, it is not be possible to load the project data using the older versions of the CDT. In case the user rejects the conversion, the project Data will be available in the read-only mode, the converted info will not be persisted. In case the user rejects the conversion, the project Data will be available in the read-only mode, the converted info will not be persisted.

38 Existing integrations support Issues Issues *.managedbuilder.* and *.make.* plug-ins removal/replacement *.managedbuilder.* and *.make.* plug-ins removal/replacement Managedbuilder and make extension points disappear Managedbuilder and make extension points disappear Plug-in dependencies failure Plug-in dependencies failure Package rename Package rename API rename API rename *.managedbuilder.* and *.make.* packages rename *.managedbuilder.* and *.make.* packages rename Public interface name changes to provide better API name clarity and consistency Public interface name changes to provide better API name clarity and consistency Solutions, options: Solutions, options: Implement the Build System based upon one of the current build plug-ins, i.e. either based on the *.make.* or *.managedbuilder.* plug-ins. Implement the Build System based upon one of the current build plug-ins, i.e. either based on the *.make.* or *.managedbuilder.* plug-ins. Using *.managedbuilder.* as a base is preferred Using *.managedbuilder.* as a base is preferred Preserve API “names” only, e.g. the org.eclipse.cdt.managedbuilder.core.IConfiguration would become org.eclipse.cdt.build.core.IConfiguration instead. Preserve API “names” only, e.g. the org.eclipse.cdt.managedbuilder.core.IConfiguration would become org.eclipse.cdt.build.core.IConfiguration instead. Rename the API as well to provide better API name clarity and consistency, but leave the old API supported and deprecated. Rename the API as well to provide better API name clarity and consistency, but leave the old API supported and deprecated. Rename the API as well to provide better API name clarity and consistency, do not support the old API Rename the API as well to provide better API name clarity and consistency, do not support the old API

39 Q & A


Download ppt "New Project Model Primary author: Mikhail Sennikovsky Contributors: Leo Treggiari Intel Corp. September, 2006."

Similar presentations


Ads by Google