-
Notifications
You must be signed in to change notification settings - Fork 198
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
Configuration option to enable/disable auto activation of the completion proposal pop up #866
Comments
@mickaelistria , is the proposal of creating an UI for the generic editor a good one? I think this editor does not have an UI. Should it rather be an extension point so that would be used in org.eclipse.ui.internal.genericeditor.ExtensionBasedTextViewerConfiguration.getContentAssistant(ISourceViewer) to be able to have an own custom IContentAssistant? That would mean adding an xsd to eclipse.platform.text\org.eclipse.ui.genericeditor\schema, right? |
I would rather avoid providing tons of options. I'm more curious about "given that a popup can interrupts flow while typing", is there some bug to fix there? Most IDEs to have auto-completion popups and people usually don't complain, so maybe there is something that Eclipse IDE does wrong and we can improve without options? |
Regarding " is there some bug to fix there", yes, I think there are two (or three) bugs in there:
The last two would be addressed by eclipse-platform/eclipse.platform.text#210 Then there is the problem that it is triggered too often (basically on any character which is a letter or a number), and without delay. I do not know about any editor that does that. That highlights the bugs above and also puts a lot of stress on the server. The JDT does not triggers on each alphanumeric character by default (as seen in the screenshot above, only after '.'). I have checked VSCode and it also has by default more conservative configuration: That is delay of 10 instead of 0, only triggered on trigger characters instead on of each alphanumeric character, and not triggered inside of strings and comments. This defaults are in my opinion better, and are very similar to the defaults of the JDT. The main difference is that VSCode has a delay, which makes sense if one is communicating with a server. Nevertheless both the JDT and VSCode allows the user to configure it. |
Finally, regarding the default configuration, I have created eclipse-platform/eclipse.platform.text#214. |
I agree that this is very annoying. Especially on large files with LSP based editor it can be a performance issue as well. It can be fixed by setting This preference setting is unfortunately hidden. When set to I am not sure how to make this preference accessible to the user. I would appreciate a new preference page for the generic text editor or creating a extension point as mentioned in #916. IMO these three preferences should be modifiable by the user: As a IDE user I am expecting that I can change the behavior in my editor (The current Java and an C/C++ editor settings in Eclipse allow it as well) |
What about an extension point which overwrites the preferences for a given content type? E.g. cdt-lsp project will provide auto-completion preferences for C/C++ content types. |
We may try to just expose the delay, and our smart users will set a high value for it. which would be equivalent to disabling the auto-assist. The hardcoded delay of
One difficulty with preferences is to decide what has higher priority in case there are multiple unrelated sources: imagine your extension point sets a preference for content-type, but a local project setting does set to a different value, which one would win? @ghentschke In the case of CDT, isn't the |
Actually this is one of the issues I've found very disturbing since I'm trying to use generic editor + TextMate for shell / xml / random other file types I have in the workspace, for which I don't want to install extra plugins. This popup annoys me while typing, as it appears on every keystroke. If there would be any way to disable it or configure it, it would be very helpful. |
Most specific one, it is already the case with workspace vs project settings. I wasn't aware we have that setting at all and it is hard coded. Best is to introduce workspace setting and use that. Whoever extends the code should either simply inherit it or be able to provide its own version. |
Note for myself: for products, either one of preferences below need to be added to product customization so that preferences are set to the more or less non-annoying state:
Of course it would be better to add "Generic Editor" preferences page below "Text Editors" that would expose the preferences above to users (and whatever else hardcoded as of today in Generic Editor). |
Did we not increase the delay already in https://github.com/eclipse-platform/eclipse.platform.text/pull/214/files to be 10 and not 0? Or are we talking about a different delay? |
If it helps, for the record, that is what we do as well.
Yes, that would be nice. One could start with a generic preference for all content types, but ideally the user should be able to configure each content type different, as the preferences allow that (see #931) |
Yes, but I think 10ms is still very fast.
I can start with a PR for a Generic Editor Preference page for the three preference settings mentioned above. The next step could be to support different preference settings for each content type. |
- rename GenericTextEditorPreferencePage to GenericEditorPreferencePage fixes eclipse-platform#866
- rename updatePreferences to updateAutoActivationPreferences - use SelectionAdapter - rename property category from 'Generic Text Editor' to 'Generic Text Editors' fixes eclipse-platform#866
…essed the depending controls should be enabled again, if they has been disabled by the lead, prior to pressing the 'Restore Defaults' button. fixes eclipse-platform#866
It is not possible to disable / enable the auto activation of the completion proposal pop up or to configure it. Many users will prefer to have the feature disabled or with another delay, given that a popup can interrupts flow while typing.
The values are currently hardcoded in the Generic Editor (see
GenericEditorContentAssistant.GenericEditorContentAssistant
)The proposal is to have a UI menu like in the JDT:
![image](https://private-user-images.githubusercontent.com/43636626/241154457-87b969e2-759a-4621-ab05-fba8d85bf28e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzI0MzcsIm5iZiI6MTczOTU3MjEzNywicGF0aCI6Ii80MzYzNjYyNi8yNDExNTQ0NTctODdiOTY5ZTItNzU5YS00NjIxLWFiMDUtZmJhOGQ4NWJmMjhlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIyMjg1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmZWY5ODU1ZmZiOWRlMjYxMzc2NmUyYWIzNDJiODRmMTVlNWJlNjc4MGMxNmJiNTMzYmJkNTRmYWE2ZjhjY2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.d7mA-gXdty5PMCoW805B8T3rF-12TXkWx1K5JDPY8fY)
for the properties that the Generic Editor offers
The text was updated successfully, but these errors were encountered: