-
Notifications
You must be signed in to change notification settings - Fork 228
Implement activity support filtering for e4 dynamic menu contribution. #2222
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
Implement activity support filtering for e4 dynamic menu contribution. #2222
Conversation
492585f to
69e65fa
Compare
|
@iloveeclipse FYI |
69e65fa to
57adcf5
Compare
|
I've just rebased on head to see current test result. |
57adcf5 to
00b0685
Compare
iloveeclipse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase on latest master before next update.
...ipse.e4.ui.workbench3/src/org/eclipse/ui/internal/activitysupport/IActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
...ipse.e4.ui.workbench3/src/org/eclipse/ui/internal/activitysupport/IActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
...s/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/ActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
...s/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/ActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
30f6fc5 to
39d5b25
Compare
iloveeclipse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only few minor issues left
...es/org.eclipse.e4.ui.workbench/src/org/eclipse/ui/activitysupport/IActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
...ipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java
Outdated
Show resolved
Hide resolved
...s/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/ActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
|
@raghucssit : could you please update the fix & rebase? |
71fdd59 to
572aa2a
Compare
|
#2217 (comment) |
|
@iloveeclipse I have fixed all the review comments and Quick Access leak also. Please check. |
ee5c4b2 to
73abc2f
Compare
|
I've first rebased but then I saw that version (and some smaller code) changes needed so I've amended last commit. Here is the diff: https://github.com/eclipse-platform/eclipse.platform.ui/compare/ee5c4b2479915e3b26c3f4b5c552d9dc1d041c88..73abc2ff90c58692f34047a21712f5d299b9ca57 |
...org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/activitysupport/IActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java
Outdated
Show resolved
Hide resolved
...s.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/DynamicContributionContributionItem.java
Outdated
Show resolved
Hide resolved
...es/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/util/ActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
...es/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/util/ActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
...es/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/util/ActivityManagerProxy.java
Outdated
Show resolved
Hide resolved
73abc2f to
a368a50
Compare
laeubi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service handling looks fine now I just have some remarks as this is adding new API at a very late stage so maybe others should review this as well:
- The service should be mentioned here: https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/docs/Eclipse4_RCP_EAS_List_of_All_Provided_Services.md this might also be a better place for explain what it does
- E4 Services sometimes start wit
Eso maybe it should beEActivityManager - Usually an E4 service should replace the existing functionality and at best the old E3 simply implements both interfaces, can we probably make use of the method
org.eclipse.ui.activities.IActivityManager.getEnabledActivityIds()instead of go through the identifier? Then the newEActivityManagercan have methodEActivityManager#getEnabledActivityIds()andorg.eclipse.ui.internal.activities.AbstractActivityManagercan just implement the new interface.
Come on, we are in M2 now. "Very late" is RC2 and we had a "good tradition" to have RC2a in the past.
I see not a single word of explanation on this document, so I don't think we should be inconsistent. I can add this service there even if it is of not big interest for E4 as it only used a s a bridge between E4 and E3 IDE parts.
Why not.
The code uses following pattern to filter out contributions: The reason is that the
Here we have an advanced functionality that was provided at E3 layer, we do not plan to refactor that and move entire E3 code to E4 layer only to fix one inconsistency with missing filtering of particular menus at E4 level. What we want is not re-implement or move activity support from E3 to E4, just make sure that as long as E3 and E4 layers co-exist (forever?) the missing functionality we found is implemented in the IDE build on top of the mixed architecture. |
a368a50 to
bedb816
Compare
there is no need to re-implement the functionality here, but even though Eclipse IDE is using the legacy layer (maybe forever) this does not is the case for all use-case, so one needs to take into account that other (pure E4 RCP Applications) will want to maybe enhance or re-implement this functionality. So when adding a new E4 service it should at laest be designed with such use-case in mind, I would like to get some feedback from @vogella @mickaelistria on that topic maybe, in general the PR looks better now. Is there a good way to actually test this? |
Let name it Technically we simply need an interface accessible from both worlds that can be implemented in E3 layer and consumed in E4 layer. |
This is not about "confusion" it is about features. here is an e3 compatibility layer and we really don't want that to be inside E4 itself as a core interface. "activity" is currently completely bound to the e3 extension point (what E4 tries to overcome by design) so we either need a real E4 counterpart (that e3 can implement like I'll try to take a look if we can probably find a better extension point here, or one should probably rethink the actual Naming and use-case.
Thanks I'll try that out, so mentioned "category" (==getEnabledActivityIds() would be "general") and "Identifier" (== PDE) ? |
No. Just check in debugger what you will see in ActivityManagerProxy.isIdentifierEnabled(). |
|
@raghucssit @iloveeclipse I have now created this does not require any new service and only provisional API changes and should be much more flexible here, it could also be used in other context. I also took the liberty to enhance the scope for handled and direct contributions as well. |
Views hidden by activities should not be shown in Quick Access (Ctrl+3) See eclipse-platform#2217
Great, thanks. What is missing in #2768 is the view filtering from quick assist from this PR. I will then keep only this one change here, which is unrelated to e4 menu stuff. |
bedb816 to
f6af0c3
Compare
|
Thanks Raghu & Christoph. |


Similar to PluginActionContributionItem we can support activity filtering of menu item to be shown or not.
see #2217