Comments (6)
+1 for only one text editor in the IDE. This will reduce the confusion for end users with the Eclipse IDE
Nice to see suggestions for simplifying the UX in the IDE from you Andrey.
from eclipse.platform.ui.
I'm a bit worried about overriding the ids of editors. I imagine some RCP products would like to use the DefaultEditor (plain text) to edit plain text, without highlighting nor anything. I suspect the ids to be considered as stable as API, so "org.eclipse.ui.DefaultTextEditor".equals(getEditor().getId()) && !(getEditor() instanceof ExtensionBasedTextEditor)
should remain true to ensure we don't break people treating id as API.
What I think would be more interesting would be to relabel the editors (as it is being discussed in #1385 ) and just make that the default behavior of IDE.open(...)
methods and the default return value for editor associations uses the Generic Editor, or whichever other editor with something based on a preference. Then we can flip the default editor in the IDE by changing the default preference, and consumers who want to stick to another editor can override the preference.
This can also serve past or future stories where some better-than-default editor was existing (eg LicClipse) and it was impossible to really make it default.
So I would suggest we reorganize this proposal as "Define and use a preference to choose what is the default editor"
from eclipse.platform.ui.
What I think would be more interesting would be to relabel the editors (as it is being discussed in #1385 )
Please not yet another discussion how to rename two text editors! It doesn't matter how we name these two editors, someone will be always upset by the chosen name. Better to fix the root cause and have one "Text" editor.
and just make that the default behavior of IDE.open(...) methods and the default return value for editor associations uses the Generic Editor, or whichever other editor with something based on a preference.
As described in the proposal, currently IDE doesn't allow to choose "preferred" editor if there are few editors registered for same content type. That must be implemented in your proposal, but the problem with two "text editors" appearing in UI will still remain and confuse everyone.
I'm a bit worried about overriding the ids of editors.
That's IMO the main issue here, the idea is to be able to switch "overriding" off for a RCP product that don't want to have it. I believe that is possible.
I also believe this will be a very small amount of products that won't have the new feature, and most of downstream clients would be happy to get rid of "schizophrenia" we have with two text editors.
from eclipse.platform.ui.
So maybe we can extract the extension point that define the Default editor in a separate bundle, and not including anymore in Platform?
As a preliminary work, we can also try to set the the default
attribute of the Generic Editor definition in plugin.xml to true
and see what happens from there.
from eclipse.platform.ui.
So maybe we can extract the extension point that define the Default editor in a separate bundle, and not including anymore in Platform?
We can't move extension point that defines any editor in question here to other bundle as this will again break compatibility with existing products that would need to change their code/imports.
As a preliminary work, we can also try to set the the
default
attribute of the Generic Editor definition in plugin.xml totrue
and see what happens from there.
Once again, that will not fix content types association problem and will not "hide" the twin contributions in UI.
from eclipse.platform.ui.
existing products that would need to change their code/imports.
Existing products would "only" have to add the legacyTextEditor
fragment if they want it in their RCP; but by default it would be removed. In general, anything that changes the "default" behavior can break some clients, and every such change should ideally come with instructions of how to revert to legacy behavior (whether it is about adding a fragment, setting of preference, or whatever switch... is equivalent).
If you want that products keep the legacy editor by default, then it means we need 1 more switches in Platform products to enable "hiding" the DefaultEditor (I suspect we can remove an entry from the editor registry based on some flag).
But let's also discuss what people expect from a Platform: they expect the platform to also provide some innovations/fixes that they don't provide themselves. If Platform has established that the Generic Editor is best and that the Text Editor is worth being retired, then Platform has the responsibility of pushing this improvement to downstream consumers too. So changing the default by retiring the legacy text editor is IMO best here, as long as we provide a simple path to people who want it back (and with my proposal above, the migration path is just about adding a fragment).
Note that in the end, I don't really care about the legacy Text Editor personally; I just shared some potential concerns with overriding the id being more error-prone than retiring the editor; but in the end, I won't veto anything that is about making the Generic Editor the default one in the SDK. To be honest, that was one of our long-term goals with @sopotc when we introduced it. Having other community members actively requesting it and likely to make it happen is too good, and I'd enjoy seeing it happen even if it might hurt some products; because I think it's still in the best interest in the Platform itself.
from eclipse.platform.ui.
Related Issues (20)
- Added or deleting lines above folded function(s) breaks what has already been folded to its definition (C++) HOT 3
- Supply all the changes from all RefactoringParticipant to RefactoringProcessor in ProcessorBasedRefactoring HOT 1
- SWT layout in Choose Workspace Dialog broken in I20240109-1800 HOT 8
- RuleBasedScanner: IllegalArgumentException
- Don't report a key bindings conflict if a binding has a disabled handler
- Wizard is too small. Regression of https://github.com/eclipse-platform/eclipse.platform.ui/pull/1283
- ChooseWorkspaceDialog resolved path issues HOT 8
- Random failing PlatformUITest#testCreateAndRunWorkbench()
- Clear ExpandableNode set when new input is set. HOT 3
- Copy and paste of a folder currently requires moving the cursor to the top folder HOT 3
- [mac] Random failing ImportExistingArchiveProjectFilterTest.testFolderVisibilityPostZipProjectImport
- Problems View: Last entry rendered italics HOT 22
- Support New > Recently Used
- Index-out-of-bounds at TrimStack.fixToolItemSelection
- Replace/Find button skips every second occurrence HOT 1
- Dirty editors do not save the file HOT 1
- Update InlinedAnnotationDemo as it uses deprecated code HOT 2
- Too many open Editors - can't read name HOT 21
- Silently erroring VirtualLazyTreeViewerTest and VirtualTableViewerTest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse.platform.ui.