Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to know if a IVariableBinding represents a local variable?
How to know if a IVariableBinding represents a local variable? [message #646038] Tue, 21 December 2010 17:04 Go to next message
Joan Robert is currently offline Joan RobertFriend
Messages: 16
Registered: December 2010
Junior Member
I've noticed eclipse.jdt.core.dom variable bindings (IVariableBinding) offer boolean methods to check if they are representing a field, Enum constant or parameter (isEnumConstant(), isField() and isParameter() ).

How can I know if it represents a local variable? Is it safe to assume that if a IVariableBinding is not one of the former three it will ALWAYS be a local variable?
Re: How to know if a IVariableBinding represents a local variable? [message #646061 is a reply to message #646038] Tue, 21 December 2010 18:22 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 12/21/2010 10:34 PM, Joan Robert wrote:
> Is it safe to assume
> that if a IVariableBinding is not one of the former three it will ALWAYS
> be a local variable?
yes
Re: How to know if a IVariableBinding represents a local variable? [message #646072 is a reply to message #646061] Tue, 21 December 2010 20:47 Go to previous messageGo to next message
Joan Robert is currently offline Joan RobertFriend
Messages: 16
Registered: December 2010
Junior Member
That's what I thought. Thanks.
Re: How to know if a IVariableBinding represents a local variable? [message #802673 is a reply to message #646072] Mon, 20 February 2012 09:24 Go to previous message
Harutyun Arzumanian is currently offline Harutyun ArzumanianFriend
Messages: 35
Registered: February 2012
Member
Hi Joan,

AS you mentioned coding about local variables, could you please tell me how did you manage renaming those local variables? and how did you get them for the first place?

[Updated on: Mon, 20 February 2012 09:25]

Report message to a moderator

Previous Topic:Auto Completion activates after 2 characters?
Next Topic:Migration from old Eclipse+MyEclipse to Indigo
Goto Forum:
  


Current Time: Sat Apr 27 01:07:49 GMT 2024

Powered by FUDForum. Page generated in 1.03438 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top