Fix exception when modifying array dimension in graphical editor#2165
Merged
Conversation
Fix exception when modifying array dimension in graphical editor. Adds basic array dimension creation, modification, and deletion to tests. Closes #2030.
Contributor
Author
|
While it may not be strictly necessary. That is intentional. It keeps
things close to the add code path and ensures that nothing else is
referencing it.
…On Thursday, January 16, 2020, RyanMcilnay ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In ge/org.osate.ge/src/org/osate/ge/internal/ui/properties/
SetDimensionsPropertySection.java
<#2165 (comment)>:
> final Aadl2Package pkg = Aadl2Factory.eINSTANCE.getAadl2Package();
- selectedBos.modify(ArrayableElement.class, ae -> {
- ae.getArrayDimensions().set(selectedIndex, createArrayDimensionDuplicate(pkg, dim));
+ final ArrayDimension dim = createArrayDimensionDuplicate(pkg, readonlyDim);
+ selectedBos.boStream(ArrayableElement.class).findAny().ifPresent(ele -> {
+ if (modifiedArrayDimension(dim, SelectionUtil.getProjectOrThrow(ele.eResource()))) {
+ selectedBos.modify(ArrayableElement.class, ae -> {
+ ae.getArrayDimensions().set(selectedIndex, createArrayDimensionDuplicate(pkg, dim));
I think this should change to "ae.getArrayDimensions().set(selectedIndex,
dim);"
instead of creating array dimension duplicate again.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#2165?email_source=notifications&email_token=AAKQA3ADPTJND7FZWFOSVBDQ6BVDNA5CNFSM4KGYVFT2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSAED5Q#pullrequestreview-343949814>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQA3GFWATJ5Z2RF5ZDH2LQ6BVDNANCNFSM4KGYVFTQ>
.
--
Philip Alldredge
Research Scientist
Rotorcraft Systems Engineering and Simulation Center
University of Alabama in Huntsville
VBRH A-4
256-824-4837
Philip.Alldredge@uah.edu
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix exception when modifying array dimension in graphical editor. Adds
basic array dimension creation, modification, and deletion to tests.
Closes #2030.