| Summary: | Unable to create view from model element | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Nicolas Guyomar <nicolas.guyomar> | ||||||||||||||||||
| Component: | EMF-Facet | Assignee: | Nicolas Bros <nicolas.bros> | ||||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||
| Priority: | P3 | CC: | Ed.Merks, emft.facet-inbox, gdupe, nicolas.bros | ||||||||||||||||||
| Version: | unspecified | Flags: | gdupe:
indigo+
gdupe: juno+ Ed.Merks: pmc_approved+ gdupe: review+ |
||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||
|
Description
Nicolas Guyomar
If it can help, the action was still working in 0.1.1.v201106171452 Nicolas Created attachment 202389 [details]
patch
Here is a patch that avoids trying to remove an empty list of rows.
Created attachment 202395 [details]
unit test patch
Here's a Junit test.
Comment on attachment 202395 [details]
unit test patch
Please, do not modify or extends existing unit test because:
- a unit test guaranties the non regression.
- unit test source code (and resources) must be independent between to bug fix.
For instance, you should extract the expected common lines in a utility class (org.eclipse.emf.facet.widgets.nattable.tests.internal.TableTestUtils).
Do not forget to update the root test class (AllUITests).
Please, do not use @SuppressWarnings("null"), unit test must respect the project coding rules.
Comment on attachment 202389 [details]
patch
I disagree with this patch because the trace message will be skipped when rowsToRemove is empty. Furthermore the use of return in the middle of a method may cause maintenance/reading problems. To my mind, an "if" block surrounding the try/catch and of the last statement would be better.
if (!rowsToRemove.isEmpty()) {
try {
CompoundCommand [...]
} catch [...]
}
this.editingDomain.getCommandStack().execute(compoundCommand);
}
Created attachment 202675 [details] unit test patch 2 New version of the patch. This patch doesn't seem to have "test.uml". I tried making the patch several times but it wouldn't add it. So, it must be copied from "Bug352822.uml". Created attachment 202676 [details]
patch
New version of the patch
Comment on attachment 202676 [details]
patch
Ok, but please don't format the lines you didn't modify (in the debug block).
Created attachment 202748 [details]
patch
Created attachment 202749 [details]
unit test patch
Created attachment 202763 [details]
patch for branch 0_1
Created attachment 202764 [details]
unit test patch for branch 0_1
Hello Ed, This bug is cause by a regression caused by the fix of the bug 345730. The bug described here is not critical because a workaround is possible: we can use the table editor in place of the table view. But this bug is caused by an invalid EMF command in the table widget implementation and I know that this widget is used by Papyrus. I think it would be safer to commit this patch before RC3. Do you agree? Regards, Gregoire Committed on branch 0_1 in revision 811. Committed on trunk in revision 812. This bug can be closed. |