Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » code completion in nested anonymous inner classes not working
code completion in nested anonymous inner classes not working [message #870766] Wed, 09 May 2012 15:02 Go to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
I've got quite a complex setup, heavily relying on anonymous inner classes. This is a Swing TableModel implementation using the Java beans API to more easily define columns.

1. create a new JpaBeanTableModelForEdit, which a.o. wants an TableColumn... in its constructor
2. create a new TableColumn for this constructor
3. the TableColumn is a normal class, but gets its body overridden in an anonymous inner class to override the getValue method.
4. the JpaBeanTableModelForEdit also is a normal class, but gets its body overridden in an anonymous inner class to handle the persisting of new beans by JPA.

In this combination of two anonymous inner classes, the code completion inside the getValue is not working.


iRelationInventoryorderTableModelForEdit = new JpaBeanTableModelForEdit<RelationInventoryorder>(RelationInventoryorder.class
	, new TableColumn<RelationInventoryorder, Integer>()
	{
		@Override public Integer getValue(final RelationInventoryorder relationInventoryorder)
		{
			return new RelationInventoryitem().getAmount().intValue();
		}
	}
)
{
	@Override public void addJpaBean(RelationInventoryorder bean)
	{
		bean.setRelationInventory( iJpaObjectNavigatorBar.getModel().getEntity() );
	}
};
Re: code completion in nested anonymous inner classes not working [message #870951 is a reply to message #870766] Thu, 10 May 2012 10:36 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam Kandula
Messages: 444
Registered: July 2009
Senior Member
Yes, there are some bugs around this area: Look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=367612. Please add your case if it is different.
Re: code completion in nested anonymous inner classes not working [message #870960 is a reply to message #870951] Thu, 10 May 2012 11:10 Go to previous message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
I've added a reference to this issue, since I have a very clear and not too big piece of code.
Previous Topic:Eclipse won't start on Ubuntu 12.04
Next Topic:get Remove Lirbrary Event
Goto Forum:
  


Current Time: Tue Sep 23 22:29:02 GMT 2014

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

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