Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Toolchain Version Check

Hi Mikhail,

 

Yes, we are not going to use the standard CDT installation and will be providing only our project types in the product. We have extended the MakeFileGenerator and will try implementing the tool chain version support in it.

But going with the current implementation we had the following observation.

Due to the version check, if the tool-chain is not in the PATH and we try creating a new Managed Make project it does nothing and gives an IndexOutOfBounds exception in the Error Log as shown below.

 java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

            at java.util.ArrayList.RangeCheck(Unknown Source)

            at java.util.ArrayList.get(Unknown Source)

            at org.eclipse.cdt.managedbuilder.ui.wizards.CProjectPlatformPage.createControl(CProjectPlatformPage.java:215)

            at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:180)

            at org.eclipse.cdt.managedbuilder.ui.wizards.NewManagedProjectWizard.createPageControls(NewManagedProjectWizard.java:99)

            at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:614)

            at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:502)

So we added an empty and not null check in CProjectPlatformPage.java to handle this.

Is there any specific reason the check is not added for empty projectTypes variable before accessing it or is it a bug?

 

Regards

-Sanchali

 

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sennikovsky, Mikhail
Sent: Wednesday, January 17, 2007 7:58 PM
To: CDT General developers list.
Subject: RE: [cdt-dev] Toolchain Version Check

 

Hi Sanchali,

 

This is a correct work-around in case your tool-chain is not going to be used with the “standard” CDT installation (that does not contain changes to the GeneratedMakefileBuilder you’ve made). The workaround with the GnuMakefileGenerator I was talking about is more “universal” in that sense that you are able to provide a custom Buildfile generator with your tool-chain without changing the CDT source code.

To specify the buildfile generator to be used for your tool-chain you should set the builder#buildfileGenerator attribute to the class name of your buildfile generator implementatyion.

Note: you don’t have to re-write the buildfile generator from scratch, but instead you could just override the default GnuMakefileGenerator with the customized behavior you need.

 

On the other hand, if your tool-chain is not intended to be supplied/used with the “standard” CDT installation, the “work-around” you are talking about is pretty fine and seems more proper than the one with overriding the GnuMakefileGenerator.

 

Regards,

Mikhail

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sanchali G. Kshirsagar
Sent: Tuesday, January 16, 2007 1:21 PM
To: CDT General developers list.
Subject: RE: [cdt-dev] Toolchain Version Check

 

Hi Mikhail,

 

Thank you for your suggestion. Instead of GnuMakefileGenerator I have tried by making changes in GenerateMakefileBuilder. In this class I have added my error checking in the build() method and it is working correctly. Just wanted to confirm if this is the correct work-around?

                        

Regards

-Sanchali

 

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sennikovsky, Mikhail
Sent: Tuesday, January 09, 2007 6:11 PM
To: CDT General developers list.
Subject: RE: [cdt-dev] Toolchain Version Check

 

Hi Sanchali,

 

The only work-around I could think of for now is to have some custom Buildfile generator (e.g. subclassed from the default GnuMakefileGenerator) and to fail during makefile generation, although I’ve not tested this. Give it a try and let me know if it does not work for you.

 

Mikhail

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sanchali G. Kshirsagar
Sent: Tuesday, January 09, 2007 8:29 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Toolchain Version Check

 

Hello Everybody,
 
We have integrated a cross toolchain for a C/C++ IDE in CDT and need the installed tool chain versions to be checked. I was able to check the version in isSupported() method. But when the project is build only a warning is given. I know that there is a bug regarding this issue (bug 116873) .I want to stop the building procedure if the versions do not match
.Could anybody tell me a way around till the changes in CDT are made?
 
Regards
-Sanchali

 


Back to the top