Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 301373

Summary: [API] [cdt.make.* and cdt.managedbuilder.*] add @noextend and @noimplement tags
Product: [Tools] CDT Reporter: Andrew Gvozdev <angvoz.dev>
Component: cdt-buildAssignee: Andrew Gvozdev <angvoz.dev>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: bbelyavsky
Version: 7.0   
Target Milestone: 7.0   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 260830, 296406    

Description Andrew Gvozdev CLA 2010-01-31 20:44:24 EST
Similar to bug 260830, add @noextend and @noimplement tags to build plugins (cdt.make.* and cdt.managedbuilder.*) packages.
Comment 1 Baltasar Belyavsky CLA 2010-02-01 10:39:27 EST
If it is of any help - here is a list of interfaces/classes which, I think, are meant to be implemented/extended. I came up with this list mainly by searching for interfaces that are referenced from .exsd files, and by searching for interfaces/classes that I personally implement/extend. So, this list is very probably incomplete.

org.eclipse.cdt.managedbuilder.core
	IBuildPathResolver
	IConfigurationNameProvider
	IConvertManagedBuildObject
	ILanguageInfoCalculator
	IManagedBuildDefinitionsStartup
	IManagedCommandLineGenerator
	IManagedConfigElementProvider
	IManagedIsToolChainSupported
	IManagedOptionValueHandler
	IManagedOutputNameProvider
	IOptionApplicability

org.eclipse.cdt.managedbuilder.envvar
	IConfigurationEnvironmentVariableSupplier
	IEnvironmentBuildPathsChangeListener
	IProjectEnvironmentVariableSupplier

org.eclipse.cdt.managedbuilder.macros
	IConfigurationBuildMacroSupplier
	IProjectBuildMacroSupplier
	IReservedMacroNameSupplier

org.eclipse.cdt.managedbuilder.makegen
	IManagedBuilderMakefileGenerator
	IManagedBuilderMakefileGenerator2
	IManagedDependencyCalculator
	IManagedDependencyCommands
	IManagedDependencyGenerator
	IManagedDependencyGenerator2
	IManagedDependencyGeneratorType
	IManagedDependencyInfo
	IManagedDependencyPreBuild

org.eclipse.cdt.managedbuilder.makegen.gnu
	GnuMakefileGenerator <- maybe not meant to be extended, but it's helpful if it is
Comment 2 Andrew Gvozdev CLA 2010-02-01 11:08:03 EST
(In reply to comment #1)
> If it is of any help - here is a list of interfaces/classes which, I think, are
Yes, it is appreciated. Thanks for this list.
Comment 3 Andrew Gvozdev CLA 2010-02-07 12:30:48 EST
(In reply to comment #1)
> If it is of any help - here is a list of interfaces/classes which, I think, are
> meant to be implemented/extended. I came up with this list mainly by searching
> for interfaces that are referenced from .exsd files, and by searching for
> interfaces/classes that I personally implement/extend. So, this list is very
> probably incomplete.
> ...
> org.eclipse.cdt.managedbuilder.makegen
How are you using any of those? AFACS they are not used in extension points and used inside cdt.managedbuilder.core plugin only. Are you using it as a model implementation of a makefile generator?
Comment 4 Baltasar Belyavsky CLA 2010-02-08 10:03:22 EST
This area is a bit messy - the IManagedDependencyGenerator interface is referenced from the .exsd, although it is deprecated. It has been replaced (not extended) by IManagedDependencyGenerator2, which we implement to provide our own dependency-calculation. The object-model, however, uses neither of these - it uses a IManagedDependencyGeneratorType, which is a superclass of both. I think whoever deprecated IManagedDependencyGenerator just forgot to adjust the .exsd file. To clean things up, I think, the .exsd should be modified to use IManagedDependencyGeneratorType. It's a minor thing, but I could open a separate defect for this, if your prefer...

But yes, we use a modified version of a makefile-generator, which we build up by extending the makegen.gnu.GnuMakefileGenerator class (which is why I would prefer it to also remain extensible).
Comment 5 Andrew Gvozdev CLA 2010-02-08 17:21:53 EST
The changes are committed to HEAD (CDT 7.0). In this round I did not tag org.eclipse.cdt.managedbuilder.makegen interfaces but tagged GnuMakefileGenerator. Let me take a closer look though.

Also, if anybody feels any other classes should be API speak up please.
Comment 6 Andrew Gvozdev CLA 2010-02-10 22:41:46 EST
OK, I believe all of org.eclipse.cdt.managedbuilder.makegen.* interfaces are meant to be extended/implemented.

I went over bug 110600 and conclude that GnuMakefileGenerator is not intended to be extended instead should be redesigned so I intend to keep the @noextend tag to communicate that to ISVs. I don't think it's going to happen any time soon though.

(In reply to comment #4)
> This area is a bit messy - the IManagedDependencyGenerator interface is
> referenced from the .exsd, although it is deprecated. It has been replaced (not
> extended) by IManagedDependencyGenerator2, which we implement to provide our own
> dependency-calculation. The object-model, however, uses neither of these - it
> uses a IManagedDependencyGeneratorType, which is a superclass of both. I think
> whoever deprecated IManagedDependencyGenerator just forgot to adjust the .exsd
> file. To clean things up, I think, the .exsd should be modified to use
> IManagedDependencyGeneratorType. It's a minor thing, but I could open a separate
> defect for this, if your prefer...
Yeah, if you up to that I'd prefer a separate bug. From a cursory look it is used in 2 extension points buildDefinitions and ManagedBuildTools and IManagedDependencyGenerator2 is used by the model for example in BuildDescription. Looks to me that IManagedDependencyGenerator2 is meant to be implemented.