Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344563 - NPE with Enum Editor
Summary: NPE with Enum Editor
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 08:52 EDT by Vincent Lorenzo CLA
Modified: 2020-05-01 11:26 EDT (History)
3 users (show)

See Also:
gdupe: indigo+


Attachments
Correct the NPE with Enum Editor (1.48 KB, patch)
2011-05-03 08:54 EDT, Vincent Lorenzo CLA
gdupe: review-
Details | Diff
Meta-model project to reproduce the bug. (35.29 KB, application/zip)
2011-05-11 10:52 EDT, Gregoire Dupe CLA
no flags Details
A model to reproduce the bug (273 bytes, text/plain)
2011-05-11 10:55 EDT, Gregoire Dupe CLA
no flags Details
New Plugin : org.eclipse.emf.facet.widgets.nattable.tests.bug344563.zip (18.79 KB, application/octet-stream)
2011-05-16 05:24 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details
Patch for Bug 344563 Non regression test (13.07 KB, patch)
2011-05-16 05:31 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff
Patch for Bug 344563 ENumComposite (2.04 KB, patch)
2011-05-17 05:17 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff
Patch for Bug 344563 Linux Compatibility (1.05 KB, patch)
2011-05-17 08:09 EDT, Nicolas Guyomar CLA
no flags Details | Diff
Patch for Bug 344563 Linux Compatibility (1.08 KB, patch)
2011-05-17 08:12 EDT, Nicolas Guyomar CLA
gdupe: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2011-05-03 08:52:05 EDT
The Enum Editor provided by EMF-Facet is not "read only". The user can write himself a value.
When this value is not allowed by the enumeration, we get a Null Pointer Exception.
Comment 1 Vincent Lorenzo CLA 2011-05-03 08:54:32 EDT
Created attachment 194572 [details]
Correct the NPE with Enum Editor

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 2 Gregoire Dupe CLA 2011-05-11 10:52:26 EDT
Created attachment 195363 [details]
Meta-model project to reproduce the bug.

Hello,

Here is a meta-model project to reproduce the bug.

(1) I, Gregoire Dupe, wrote 100% of the code.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.

Regards,
Gregoire Dupe
Comment 3 Gregoire Dupe CLA 2011-05-11 10:55:41 EDT
Created attachment 195365 [details]
A model to reproduce the bug

Hello,

Here is a model to reproduce the bug.

(1) I, Gregoire Dupe, wrote 100% of the code.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.

Regards,
Gregoire Dupe
Comment 4 Gregoire Dupe CLA 2011-05-11 12:03:50 EDT
Comment on attachment 194572 [details]
Correct the NPE with Enum Editor

Hello,

With this patch a warning message pops up. I’ll commit fix which avoid the warning pop-up message.

Regards,
Gregoire Dupe
Comment 5 Gregoire Dupe CLA 2011-05-11 12:07:01 EDT
I fixed this bug.

Committed revision 643.

Regards,
Gregoire Dupe
Comment 6 Gregoire Dupe CLA 2011-05-11 12:07:47 EDT
A non regression is still missing.
Comment 7 Nicolas Guyomar CLA 2011-05-16 05:24:44 EDT
Created attachment 195704 [details]
New Plugin : org.eclipse.emf.facet.widgets.nattable.tests.bug344563.zip

Hi,

Please find attached a new plug-in which contains the implementation of a metamodel dedicated to reproduce this bug.

The authors are Gregoire Dupe (commiter) and myself : 

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 8 Nicolas Guyomar CLA 2011-05-16 05:31:03 EDT
Created attachment 195706 [details]
Patch for Bug 344563 Non regression test

Hi,

Please find attached a non regression test for this bug.

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 9 Nicolas Guyomar CLA 2011-05-17 05:17:49 EDT
Created attachment 195824 [details]
Patch for Bug 344563 ENumComposite

Hi,

I need to enable the user to press 'Enter' key to validate its choice while using the EnumCellEditor, as well as the 'Cancel' key to cancel the edition of the cell

Here is a patch which add a keyListener (same listener as the other cellEditor) to the ENumComposite's comboBox

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 10 Gregoire Dupe CLA 2011-05-17 05:46:06 EDT
Comment on attachment 195704 [details]
New Plugin : org.eclipse.emf.facet.widgets.nattable.tests.bug344563.zip

Here is a contribution from one employee of Mia-Software and of my self, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revision 666.
Comment 11 Gregoire Dupe CLA 2011-05-17 05:48:14 EDT
Comment on attachment 195706 [details]
Patch for Bug 344563 Non regression test

Here is a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revision 667.
Comment 12 Gregoire Dupe CLA 2011-05-17 05:48:24 EDT
Comment on attachment 195824 [details]
Patch for Bug 344563 ENumComposite

Here is a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

I've committed this contribution.

Committed revision 667.
Comment 13 Gregoire Dupe CLA 2011-05-17 05:51:08 EDT
This bug can be marked as resolved.
Comment 14 Nicolas Guyomar CLA 2011-05-17 08:09:02 EDT
Created attachment 195841 [details]
Patch for Bug 344563 Linux Compatibility

Hi,

The non regression test is failing on Hudson because there is a difference between Linux and Windows way of activating the ENumCoposite.

On Windows when we edit an enum cell, the comboBox's content is automatically selected so that when we type it erases the previous content. On Linux the comboBox's content is not selected, and we add what we type to the current content.

This patch initialize the content a the comboBox with an empty String, so that the test behave the same way on both platform.

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 15 Nicolas Guyomar CLA 2011-05-17 08:12:32 EDT
Created attachment 195845 [details]
Patch for Bug 344563 Linux Compatibility

Updated version of the fix for Linux without warnings

(a) I, Nicolas Guyomar, wrote 100% of the code I've provided.
(b) I have the right to contribute the code to Eclipse.
(c) I contribute the content under the EPL.
(d) This contribution contains no Cryptography features.

Regards,
Nicolas Guyomar
Comment 16 Gregoire Dupe CLA 2011-05-17 08:24:54 EDT
Hello,

I reopen this bug to remember that the attachment 195845 [details] has to committed after the build of 0.1.0. RC1.

The attachment 195845 [details] is a patch of a unit test class and not of a component provided to the user.

Regards,
Gregoire Dupe
Comment 17 Gregoire Dupe CLA 2011-05-20 09:37:53 EDT
Comment on attachment 195845 [details]
Patch for Bug 344563 Linux Compatibility

Here is a contribution from one employee of Mia-Software, targeting future
Indigo release. The company has signed a Member Commiter Agreement. The
contribution does not need a CQ (see bug 322327).

The unit test org.eclipse.emf.facet.widgets.nattable.tests.swtbot.Bug344563Test.testBug344563 is still failing on Hudson.eclipse.org. I’ve then committed this patch without any PMC review in conformance with http://dev.eclipse.org/mhonarc/lists/modeling-pmc/msg02061.html

Committed revision 689.

Regards,
Gregoire Dupe
Comment 18 Gregoire Dupe CLA 2011-05-24 10:33:22 EDT
The build https://hudson.eclipse.org/hudson/job/emffacet-nightly/351/ runs without any test failure. This bug can then be marked as fixed.
Comment 19 Gregoire Dupe CLA 2011-06-06 10:22:19 EDT
The corresponding unit test succeed in https://hudson.eclipse.org/hudson/job/emffacet-nightly/355/testReport/org.eclipse.emf.facet.widgets.nattable.tests.swtbot/Bug344563Test/. We can then close this bug.