Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313420 - Primary key generation, Generator name combo does not remove text from source
Summary: Primary key generation, Generator name combo does not remove text from source
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.3   Edit
Assignee: Nan Li CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-18 14:36 EDT by Paul Fullbright CLA
Modified: 2012-10-09 13:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fullbright CLA 2010-05-18 14:36:47 EDT
With the following in java source, 

@Entity
public class Bar {
	@Id
	@GeneratedValue(generator = "foo")
	private String foo;
}

type in the Generator name combo.  Then backspace out.  The combo is left with nothing in it, but the source is left with:

	@GeneratedValue(generator = "f")


The same thing happens in xml as well.
Comment 1 Neil Hauge CLA 2011-05-03 12:51:58 EDT
The following exception is thrown along with this.

java.lang.NullPointerException
	at org.eclipse.jpt.jpa.ui.internal.details.GeneratedValueComposite$3.setValue_(GeneratedValueComposite.java:155)
	at org.eclipse.jpt.jpa.ui.internal.details.GeneratedValueComposite$3.setValue(GeneratedValueComposite.java:144)
	at org.eclipse.jpt.jpa.ui.internal.details.GeneratedValueComposite$3.setValue(GeneratedValueComposite.java:1)
	at org.eclipse.jpt.common.ui.internal.swt.AbstractComboModelAdapter.selectionChanged(AbstractComboModelAdapter.java:504)
	at org.eclipse.jpt.common.ui.internal.swt.AbstractComboModelAdapter.comboSelectionChanged(AbstractComboModelAdapter.java:496)
	at org.eclipse.jpt.common.ui.internal.swt.AbstractComboModelAdapter$3.modifyText(AbstractComboModelAdapter.java:223)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
Comment 2 Neil Hauge CLA 2011-07-01 16:26:03 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 3 Neil Hauge CLA 2011-10-07 12:52:20 EDT
Targeting to Juno release.
Comment 4 Karen Butzke CLA 2012-09-25 08:36:22 EDT
Nan and I can't reproduce this issue anymore. Brian's change to ignore java element change events when in the JPA Details view probably solved this problem
Comment 5 Jolene Moffitt CLA 2012-10-09 13:26:39 EDT
Verified in build I-3.5.0-20121003040013 that when you backspace in the Generator name field the editor is updated correctly and no errors appear. Verified you can perform the same action in the orm.xml mapping file and no errors appear.  To view steps for testing go to http://wiki.eclipse.org/Dali_3.3_Release