Skip to content
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

Some options on the Decompiler page seem to be more related to Display #1130

Closed
zspitz opened this issue May 9, 2018 · 2 comments
Closed
Labels
Help Wanted Output Output code formatting; hyperlinks/tooltips on output code UI

Comments

@zspitz
Copy link

zspitz commented May 9, 2018

2018-05-10 02_28_27-options
AFAICT, the two options Enable folding on all blocks in braces and Expand member definitions after decompilation don't affect the text output in any way, so perhaps they should be on the Display page.

@siegfriedpammer
Copy link
Member

You are correct from the user's point of view. But, in order to set fold markers and their initial state (collapsed/expanded) we need to tell the output layer of the decompiler during text generation to insert these markers. That's how the option landed in the DecompilationSettings class and thus in the DecompilerSettingsPanel.

I think it would involve a bit of work to move these settings to the other panel. Currently each panel has only one settings class it deals with. Is it worth the effort? You could try to move it and contribute a pull request. But, to be honest, I cannot think of a really clean way to solve this...

Two ideas, both of them are breaking changes to our public APIs and will affect plugin devs:

  • Extend the Language class to add an "OutputOptions" class to each Decompile method.
  • Extend the ITextOutput interface: Add properties for options or a single property for the options class. I think this is a bad idea, because the ITextOutput interface should stay unidirectional, i.e., only be the target of invocations and not carry any additional visible state.

I don't think this is going to happen in the 3.x version. Even if contributed, the earliest would be 4.0, due to semver constraints.

@siegfriedpammer siegfriedpammer added UI Output Output code formatting; hyperlinks/tooltips on output code Help Wanted labels May 10, 2018
@dgrunwald
Copy link
Member

I don't see why the API of ICSharpCode.Decompiler and the ILSpy UI have be related.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted Output Output code formatting; hyperlinks/tooltips on output code UI
Projects
None yet
Development

No branches or pull requests

3 participants