Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Can anyone give me an example where the eclipse JDT creates a CAPTURE binding?
Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645053] Wed, 15 December 2010 11:47 Go to next message
Joan Robert is currently offline Joan RobertFriend
Messages: 16
Registered: December 2010
Junior Member
Hi, can anyone give me an example where the eclipse JDT creates a CAPTURE binding?

I've read several capture conversion tutorials, but when I copy-paste the code, I can never find a capture conversion binding in the Abstract Syntax Tree (using the plugin AST-View for eclipse).
Re: Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645063 is a reply to message #645053] Wed, 15 December 2010 12:41 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 12/15/2010 5:17 PM, Joan Robert wrote:
> Hi, can anyone give me an example where the eclipse JDT creates a
> CAPTURE binding?
Have you tried snippets from
http://www.ibm.com/developerworks/java/library/j-jtp04298.ht ml (same
link which was mentioned in an earlier ans)?

>
> I've read several capture conversion tutorials, but when I copy-paste
> the code, I can never find a capture conversion binding in the Abstract
> Syntax Tree (using the plugin AST-View for eclipse).
Look for 'KIND' attribute in a type binding node.
Re: Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645066 is a reply to message #645063] Wed, 15 December 2010 13:39 Go to previous messageGo to next message
Arlindo is currently offline ArlindoFriend
Messages: 33
Registered: August 2009
Member
I read that tutorial. I think no capture bindings are created...

[Updated on: Wed, 15 December 2010 14:34]

Report message to a moderator

Re: Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645075 is a reply to message #645066] Wed, 15 December 2010 14:07 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 12/15/2010 7:09 PM, Arlindo wrote:
> Yes, that was one of the tutorials I read. No capture bindings are
> created... :(
public void rebox(Box<?> box) {
box.put(box.get());
}
see binding for box.get()
Re: Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645081 is a reply to message #645075] Wed, 15 December 2010 14:31 Go to previous messageGo to next message
Arlindo is currently offline ArlindoFriend
Messages: 33
Registered: August 2009
Member
You're right.

I was only trying with code snippets that didn't generate errors, that's why.

Does this mean, that Capture bindings are only created in erroneous code?
Re: Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645109 is a reply to message #645081] Wed, 15 December 2010 14:58 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 12/15/2010 8:01 PM, Arlindo wrote:
> You're right.
>
> I was only trying with code snippets that didn't generate errors, that's
> why.
>
> Does this mean, that Capture bindings are only created in erroneous code?
Not a smart question

try with
public void rebox(Box<?> box) {
box.get();
}
Re: Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645110 is a reply to message #645109] Wed, 15 December 2010 14:59 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 12/15/2010 8:28 PM, Deepak Azad wrote:
> On 12/15/2010 8:01 PM, Arlindo wrote:
>> You're right.
>>
>> I was only trying with code snippets that didn't generate errors, that's
>> why.
>>
>> Does this mean, that Capture bindings are only created in erroneous code?
> Not a smart question

The node (in AST) with capture binding does not have an error.
Re: Can anyone give me an example where the eclipse JDT creates a CAPTURE binding? [message #645111 is a reply to message #645110] Wed, 15 December 2010 15:46 Go to previous message
Arlindo is currently offline ArlindoFriend
Messages: 33
Registered: August 2009
Member
This last example is great. Thanks.

[Updated on: Wed, 15 December 2010 15:49]

Report message to a moderator

Previous Topic:SWT Shift+F2
Next Topic:Annotation insert location
Goto Forum:
  


Current Time: Fri Apr 26 01:21:02 GMT 2024

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

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

Back to the top