-
Notifications
You must be signed in to change notification settings - Fork 227
Reopen tab works for Editor Tabs and View tabs respectively. #3221
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
base: master
Are you sure you want to change the base?
Reopen tab works for Editor Tabs and View tabs respectively. #3221
Conversation
I don't think this is true. "Editor" is a concept of E3 / IDE. A Tab is actually a view in the So I'm not 100% sure from the description what you want to change, but as the |
private static final String ONBOARDING_TEXT = "EditorStack.OnboardingText"; //$NON-NLS-1$ | ||
public static final String TAB_UNIQUE_PATH = "editor.uniquePath"; //$NON-NLS-1$ | ||
public static final String VIEW_UNIQUE_ID = "view.uniqueID"; //$NON-NLS-1$ | ||
public static final String EDITOR_TAB = "CompatibilityEditor"; //$NON-NLS-1$ |
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.
An editor must not be a compatibility view/editor. this is only when you have E3 editors and using the compatibility layer.
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.
An editor must not be a compatibility view/editor. this is only when you have E3 editors and using the compatibility layer.
You’re right — strictly speaking, editors only exist in the E3 compatibility layer. But in practice, this was the only reliable way I found to distinguish editor-like parts from views. Since users interact with editor tabs much more frequently than view tabs, I felt it made sense to treat them differently rather than having a single generic reopen option clubbing both.
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.
I see several problems here:
- The feature assumes the E4 Compatibility layer is used
- It depends in some hard coded strings to be present in IDs and names
- It retains Parts and Context objects possibly forever what will be a source of memory leak that can only be avoided by a restart of Eclipse
Instead I think
- the distinction between "Editor" and "View" is not needed. The context here is the container (the
PartStack
) so I would probably want to restore a tab for one stack but it does not matter what is in this stack. - if this should be enabled always, we need a tag to disable this feature for a partstack so that users have an option to opt-out. As an alternative one would maybe want a way to opt-in for the feature using a tag
- The context and parts should not be retained forever. There are already ways to persist and restore state between restarts of Eclipse and we should use these technique here as well so that not objects are retained forever.
- There should be a preference for the user to configure the number of tabs that can be restore
Test Results 2 784 files ±0 2 784 suites ±0 1h 50m 0s ⏱️ - 2m 8s For more details on these failures and errors, see this check. Results for commit e372b08. ± Comparison against base commit 81b03a6. ♻️ This comment has been updated with latest results. |
Thanks for the detailing on E3 and E4 differentiation which i was not aware of. I was referring to the E3 kind of terminology itself like
|
730c5ae
to
90d1f4c
Compare
90d1f4c
to
85dbca5
Compare
This pull request changes some projects for the first time in this development cycle.
An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patch
Further information are available in Common Build Issues - Missing version increments. |
Provide "Reopen Closed Tab" option for the user.
Fixes #2148
There are basically 2 types of tabs in eclipse.
I have attached step by step screen shots for the implementation where this "Reopen Closed Tab" is visible/shown
Note : When there is no tab yet closed, this menu option doesnt show up.
Observations