Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] IConfiguration.getToolFromInputExtension-behavior differsin 4.0

Hi Beth,

The exception is thrown because the option is no longer a stringList
value type.
There was a new method introduced: IOption.getBasicStringListValue()
that might be used for querying the string array option value of any
type.

FYI: In addition to this method the IOption.getBasicValueType() method
was added. This method behaves in the same way as
IOption.getValueType(), but returns IOption.STRING_LIST for any
string-array value type.
These two methods allowed a much more simple way of option value
querying, i.e. instead of having multiple case statements like
switch(option.getValueType()){
case includes:
	option.getIncludes()
case libraries:
	option.getLibraries()
case string_list:
	option.getStringListValue()
case objects:
	option.getObjects()
..etc.
}

it is now possible to use
switch(option.getBasicValueType()){
case IOption.STRING_LIST:
	option.getBasicStringListValue();
}

Regards,
Mikhail

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Beth Tibbitts
Sent: Friday, May 11, 2007 7:01 PM
To: CDT General developers list.
Subject: RE: [cdt-dev] IConfiguration.getToolFromInputExtension-behavior
differsin 4.0

OK it recognizes the option type now but I can't get the string values
out
of it?
      int type = option.getValueType();
      switch (type) {
      case IOption.LIBRARY_PATHS:// this is type for library search path
cdt 4.0 as of 5/11/07
            String[] valueList = option.getLibraries();// this throws an
error.  we need option.getLibraryPaths() ???
            String[] test=option.getStringListValue();// this was the
old
way but now throws an error


...Beth

Beth Tibbitts  (859) 243-4981  (TL 545-4981)
High Productivity Tools / Parallel Tools  http://eclipse.org/ptp
IBM T.J.Watson Research Center
Mailing Address:  IBM Corp., 455 Park Place, Lexington, KY 40511


 

             "Sennikovsky,

             Mikhail"

             <mikhail.sennikov
To 
             sky@xxxxxxxxx>            "CDT General developers list."

             Sent by:                  <cdt-dev@xxxxxxxxxxx>

             cdt-dev-bounces@e
cc 
             clipse.org

 
Subject 
                                       RE: [cdt-dev]

             05/10/2007 02:27
IConfiguration.getToolFromInputExte 
             PM                        nsion-behavior    differs in 4.0

 

 

             Please respond to

               "CDT General

             developers list."

             <cdt-dev@eclipse.

                   org>

 

 





Hi Beth,

I've made ths gnu tool-chain definitions to use LIBRARY_PATHS and
UNDEF_PREPROCESSOR_SYMBOLS option types.
You should be able to use the LIBRARY_PATHS options types for getting
library options for the gnu tool-chains now.
Please give it a try.

Regards,
Mikhail


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Sennikovsky, Mikhail
Sent: Thursday, May 10, 2007 10:06 PM
To: CDT General developers list.
Subject: RE: [cdt-dev] IConfiguration.getToolFromInputExtension-behavior
differs in 4.0

Hi Beth,

I have not yet updated the Gnu tool-chain definitions to use the new
option types, so you will need to use the old mechanism for now.
That's why you're still seeing them as "String-list"
I'll do it for M7

Mikhail

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Beth Tibbitts
Sent: Wednesday, May 09, 2007 9:13 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] IConfiguration.getToolFromInputExtension
-behavior differs in 4.0

Now that I can get the Linker :-) I want to add to the linker settings.

I want to add to -l (libraries)  the libname.
That seems like it should be the option of type IOption.LIBRARIES.

And I want to add to -L (library search path) the libPath..
May I presume that's the option of type IOption.LIBRARY_PATHS?
(not IOption.LIBRARY_FILES, right?)

Previously I got the options this way:

ITool cfTool = cf.getToolFromInputExtension(ext); // where ext="o" to
find
linker tool
//Before I got the option for "-l (libraries)" like this:
            IOption option =
cfTool.getOptionById("gnu.c.link.option.libs"
);
//And I got the option for " -L (library search path)" like this:
            IOption
option=cfTool.getOptionById("gnu.c.link.option.paths");
But I don't like to hardcode it so.



I can correctly get the option for compiler include paths thusly:

ITool cfTool = cf.getToolFromInputExtension("c"); // compiler
IOption[] allOptions=cfTool.getOptions();
Then loop through each IOption till I find the one whose
       option.getValueType().equals(IOption.INCLUDE_PATH)

However it doesn't work for libraries.
I can get the option for "-l (libraries)"
by looping thru each of the options and looking for option.getValueType
().equals(IOption.LIBRARIES)
but
I can't get the option for Library search path (-L) comes in as its
getValueType() equal to
IOption.STRING_LIST  instead of the expected IOption.LIBRARY_PATHS.
How do I get the option of this type?
I guess that really is the "value type" since it returns multiple
values..
How *do* I get hold of this option?
As a workaround I can get the string list one and then test to be sure
its
name matches,
but this doesn't seem right.


...Beth

Beth Tibbitts  (859) 243-4981  (TL 545-4981)
High Productivity Tools / Parallel Tools  http://eclipse.org/ptp
IBM T.J.Watson Research Center
Mailing Address:  IBM Corp., 455 Park Place, Lexington, KY 40511




             Beth

             Tibbitts/Watson/I

             BM@IBMUS
To
             Sent by:                  cdt-dev@xxxxxxxxxxx

             cdt-dev-bounces@e
cc
             clipse.org


Subject
                                       [cdt-dev]

             05/08/2007 11:31
IConfiguration.getToolFromInputExte
             PM                        nsion - behavior  differs in 4.0





             Please respond to

               "CDT General

             developers list."

             <cdt-dev@eclipse.

                   org>











I'm converting my wizard page (MBSCustomPage)  to CDT 4.0 and also
trying
to make it more generic.
In the Runnable that gets called after wizard pages are complete, I'm
seeing different behavior in CDT 4.0

Why in 3.1.2 did I do
IConfiguration cf = ...;
ITool cfTool = cf.getToolFromInputExtension("o");
and it gave me the GCC C Linker,
but in 4.0 it gives me the GCC Archiver ?  I need the linker.

Looks like FolderInfo.getToolFromInputExtension() returns the first
tool that matches.  Is there more than one now?

How should I get the linker? I want to add to its settings.
I want to add to -l (libraries)  the libname.
That seems to be the option of type IOption.LIBRARIES.

And I want to add to -L (library search path) the libPath..
May I presume that's the option of type IOption.LIBRARY_PATHS?
(not IOption.LIBRARY_FILES, right?)

I seem to be able to get the option of type IOption.INCLUDE_PATHto add
to
the include paths just fine.
ITool cfTool = cf.getToolFromInputExtension("c")  gives me the GCC C
Compiler as expected to do that.

...Beth

Beth Tibbitts  (859) 243-4981  (TL 545-4981)
High Productivity Tools / Parallel Tools  http://eclipse.org/ptp
IBM T.J.Watson Research Center
Mailing Address:  IBM Corp., 455 Park Place, Lexington, KY 40511

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top