-
Notifications
You must be signed in to change notification settings - Fork 227
Allow using visible regions with projections #3074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using visible regions with projections #3074
Conversation
48e4b9a to
88d2623
Compare
Test Results 2 778 files ± 0 2 778 suites ±0 1h 36m 42s ⏱️ - 7m 29s For more details on these failures, see this check. Results for commit da38e3d. ± Comparison against base commit 477d106. ♻️ This comment has been updated with latest results. |
|
@danthe1st : thanks for PR, few things:
|
I'll make sure to do that once I located and fixed a remaining issue in combination with JDT (if I select a method that's within a custom folding region and enter text, it seems to show "too much" text for some reason). While I think that's an issue with JDT-UI (it only seems to happen with custom folding regions and extended folding), I want to be sure about it first (and I opened this PR before everything is finished to make it visible in advance/allow for discussion if applicable). |
bb4f64a to
5274f99
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
|
I have made the requested changes. However, I want to note the following:
|
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
5274f99 to
5b7cb97
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
5b7cb97 to
fb861bc
Compare
|
I am not sure why the Jenkins build seems to have issues getting tycho set up (maybe issues with https://repo.eclipse.org/?) |
|
Yes there are infrastructure problems again:
I restarted the build. |
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
fb861bc to
c5fb5f3
Compare
|
It looks like there was a test failure: https://ci.eclipse.org/platform/job/eclipse.platform.ui/job/PR-3074/lastCompletedBuild/testReport/ |
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
c5fb5f3 to
f34844d
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
f34844d to
7ff50f2
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
7ff50f2 to
2ce3ba0
Compare
|
I now switched to an approach that should have fewer side effects. Instead of adding additional projection regions, I am now using the |
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
d2f4f5a to
7a9cf09
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
|
@iloveeclipse Would you like to re-review this (and eclipse-jdt/eclipse.jdt.ui#2302) at some point when you have time? I think I forgot to mention that I have made the requested changes. |
b9af163 to
5667d40
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
5667d40 to
440ad1b
Compare
|
As I didn't get any feedback until now, I made the following choice (can still be changed if there are good reasons for it): Since it is possible for changes outside of the visible region to happen (e.g. using custom actions, other code adding projection regions or anything else that might modify the document) and users wouldn't be interested to see stuff outside of the visible region, I decided to change the logic to ignore collapsing and expanding outside of the visible region. I also adjusted the description accordingly.
|
440ad1b to
16c61a9
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
|
@mickaelistria can you help reviewing this? |
16c61a9 to
1a79bb7
Compare
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
While ProjectionViewer supports both using visible regions and projections, these features cannot be used in conjunction. This change allows the use of projections when visible regions are used. Fixes eclipse-platform#3074
1a79bb7 to
92394ce
Compare
|
It seems like this PR missed M1 now. Would it be possible to get this reviewed before M2 (with sufficient time left for eclipse-jdt/eclipse.jdt.ui#2302)? Or would it be better to wait for another release cycle (2026-03)? But even in that case, it would be better to get this reviewed at some point. |
|
I won't review in details but this patch adds many good tests, is actually a fix, has no new API and all payload changes are internal and isolated; and code is understandable enough. So let's merge and worth case, we can revert it. |
|
This PR caused regression: #3380 |
|
This PR caused another regression: eclipse-jdt/eclipse.jdt.ui#2532 @mickaelistria, @danthe1st : please follow up. The way the listener is added & removed is not OK, as it will be not always removed. A simple solution is doable, I've posted it on the bug, but I'm not sure if that is enough. |
|
@danthe1st @iloveeclipse I think we should give about a week for a fix to be pushed, and if nothing has happened before that, we can revert. |
|
causes breaking change in Xtext comment editing strategy eclipse-xtext/xtext#3531 |
This is my attempt to fix #3073 in order to implement eclipse-jdt/eclipse.jdt.ui#2264
Description
ProjectionViewercurrently cannot use visible regions and projections together (except by callingenableProjections()aftersetVisibleRegionsin which case it will show a wrong region). This PR changes the implementation of visible regions to collapse everything outside the visible region.Note
This PR does not allow collapsing or expanding any projection/folding regions outside of the declared visible region (e.g. by other code modifying the document in some way or if a projection region is partially in the visible region).
Aside from that, this implementation has the following effect: If
setVisibleRegionis called with a region that is fully collapsed, the editor is basically empty. If another behavior is desired, it would be good to know what the better behavior is.testing with JDT
To test this with JDT as requested in eclipse-jdt/eclipse.jdt.ui#2264, do the following: