Closed emammoser closed 2 years ago
Is it possible to test this feature using the "papyrus_bugfix" branch?
This is the dialog for conflict pathmaps and users will be able to suppress future warnings as long as there are no new mappings introduced for the same pathmap.
Users will be able to choose the mapping from the URI mappings preference page.
Let me know if you have any questions or comments.
A few things:
Thanks for the input. Please see the comments in-line.
A few things:
- I am all for testing tickets using alternative "bug fix" branches before pushing in larger tickets. ys] ok thanks
- I would like to see what happens when we see multiple pathmap conflicts. One of the things we want to see is a single dialog that lists all pathmap conflicts when they are recognized. That way the user doesn't have to keep making selections and then new dialogs keep popping up for other conflicts. ys] See the answer to question 3.
- In your example above, it seems like the only solution is to accept the mapping change that you are suggesting. What if in the dialog above I didn't want "test2" and I still wanted the first one? I know I can go to the URI Mappings preference, but it would be preferred to also select which pathmap I want in the warning dialog itself.
ys] I will add the mapping selection combo box right in the warning dialog for the pathmap so users can select the mapping when they appear.
I will make this change and let you know when it is ready.
One quick comment to. When I say "multiple pathmap conflicts", I mean for literally different pathmaps altogether. So, for example, we might have a model "ModelA.uml" with a pathmap "MYPATHMAP". Then we have a totally different model "ModelB.uml" with a different pathmap "DIFFERENTPATHMAP". If somehow I have conflicts for both of those, currently we get a dialog for the conflict for ModelA, and then a seperate dialog for the conflict for ModelB
The changes are coming continuously from the Eclipse workspace change listener so we do not really know when to open the dialog for all warnings. You may get several events coming in separately or together containing multiple pathmap changes.
We can do the one dialog IF the mapping is done once at the start up and triggered by the "remap" button any other time. This means that no automatic pathmap activation when you drag or import a new project into the workspace.
I will experiment with something so that at least one dialog is open for all changes during the initial start-up, but might not guarantee this when multiple projects are brought into the workspace. I will let you know when I have something to show.
I can make one dialog but the catch is that I cannot determine which pathmaps are newly added so I have to show all pathmaps that have multiple mappings in the dialog. Is this acceptable??
That looks better. My next question would be what the pathmap the bottom check box is referring to? My guess is pathmap://PATHMAP222, but it might be nice if the table had a new column with checkboxes or true/false for whether or not to suppress warnings
I am making changes so that only new conflicts that are not suppressed will show up on the dialog. There are quite a bit of code changes since we are now keeping multiple path mappings in order to support changes between multiple mappings. I will let you know when things are ready so you can test them.
You will see the pathmaps that are not suppressed from the conflict dialog.
You will also get appropriate warnings when pathmap mapping changes. e.g..)
Please test the "papyrus_bugfix" branch, and provide me with more comments.
Here is the pull request: https://github.com/ZeligsoftDev/CX4CBDDS/pull/418 A new column is added for the suppressed warning state.
This is looking really good. I did hit 1 issues with my early testing. If I had 3 projects pulled in. Each with a model, each with a pathmap. Then I copied those projects outside of eclipse 3 times each and imported all 9 projects. The dialog would only pop up with conflicts for the first model. For example, the following folder structure where each project "ProjectA" is the same and "ProjectB" is the same and 'ProjectC" is the same other than different paths and project names.
Thanks. I will take a look at the issue.
I did not reproduce the same issue you described. I think it might depend on how those projects are imported. I imported all of them together via File->Import-> Import existing project and selected the root folder that contains all sub folders.
Can you please describe steps to import those copied projects into workspace?
Import the Original non-numbered projects first. So ProjectA, ProjectB, and ProjectC. Then, import the other 9 after that.
Ok. I was able to reproduce it.
@j26151 Can you please check to see if the issue is fixed?
Everything else looks good to me. One last thing however. When the current mapped pathmap is removed, it looks like CX just picks what dynamic pathmap it will use instead. Can we instead show the same dialog with CXs suggestion as the current value? This way the user could select something else. If I have ProjectA, test1/ProjectA-1, and test2/ProjectA-2 and I delete the original ProjectA which was also the model containing the chosen pathmap. CX choosen either test1/ProjectA-1 or test2/ProjectA-2. Instead, I would like it to show the dialog with one of those options chosen so that users can decide or just click OK if they are fine with CX's suggestion
Absolutely, I will work on it and let you know.
Done. I will merge the pull request after code review if no other issues are found.
Fix merged onto "papyrus" branch. I will close this issue once verified.
When I had ProjectB and its 3 other version as well as ProjectC and its 3 other version imported. Then I removed both projects that had the dynamic pathmap set I got the following 4 dialogs:
Ideally we would want one dialog that looks like one of the dialogs on the left of the image that has both removed pathmaps and their new suggestion. What are your thoughts here? I know this seems like a fairly silly case, but it is often that we might have git projects with 5 or so ICMs that are pathmapped. If we remove that single project, we could see up to 10 of these dialogs which would definitely not be ideal.
I do understand the need for the right dialog now after actually reading it. Although we would want those consolidated as well. So maybe the above can become 2 dialogs instead of 4?
Yes. I didn't think of that case. I will look into it and let you know.
I've started the pull request for this fix. https://github.com/ZeligsoftDev/CX4CBDDS/pull/421 Can you verify that the fix works on your side?
I was seeing all kinds of different behavior. The first time I tried to import a few more models with conflicting pathmaps, my eclipse hung for a few minutes. The second time, when I tried to remove some projects that were the current pathmaps, I still got all of the disparate dialogs . Also, I got this NPE:
I've made some changes to make it more robust. You will notice some delays when you import or remove dynamic models to consolidate all possible event sequences. Can you please verify this?
I think things are working much better now :)
When I delete 2+ projects each containing a pathmapped model in one delete operation, I still receive multiple dialogs for the pathmaps:
The only way to consolidate dialogs is to keep waiting for the next event as long as a new event occurs within a preset delay period. What is the optimal delay to wait for the next event is unknown. If you wait longer then you are guaranteed to get one dialog but the Eclipse will freeze for a longer period. If you set a shorter delay then you might get multiple dialogs if an event process time takes longer than the delay period.
I added a new field in the URI mappings preference page to set the delay time to wait for a new event. The consolidated dialog will open once there are no more events detected within the delay period. Can you try different values to see what works best for you? I can set that delay value to be the default.
There will be no perfect value for this so please let me know the value that works best for the average use cases rather than the edge case.
This looks great to me. I think we should set the value to 1 second for now. 1 second worked for me. If our users have issues with 1 second we can revisit it later. The last fix I would ask for is that the "Open URI Mappings preference page for all pathmap list" changed to "Open URI Mappings preference page for full pathmap list"
All done and merged.
I have verified this on our end. Thank you
Thanks
Issue and tracking information
We would like the following added to the pathmap conflict dialog:
Developer's time Estimated effort to fix (hours):
Developer's Actual time spent on fix (hours)
Issue reporter to provide a detailed description of the issue in the space below