ILspy suggestion: base instead SUPER in decompiled code

Have some feedback and input to share?
Don't be shy and drop us a note. We want to hear from you and strive to make our site better and more user friendly for our guests and members a like.
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

ILspy suggestion: base instead SUPER in decompiled code

Post by George »

Using ILSpy 5.02 with ILSpy.XSharpLanguage.Plugin to decompile one small App, I saw the 'base' instead of 'SUPER' in decompiled code.

In constructor you can see: base(view)
In method Calculate corrrectly exists: SUPER:Calculate(hitTestResult, physicalPoint)

using DevExpress.Portable.Input
using DevExpress.XtraRichEdit
using DevExpress.XtraRichEdit.Layout
using DevExpress.XtraRichEdit.Mouse
using DevExpress.XtraRichEdit.Utils
using System.Drawing

public class MyMouseCursorCalculator inherit MouseCursorCalculator
public constructor(view as RichEditView );
base(view)


public override method Calculate(hitTestResult as RichEditHitTestResultCore , physicalPoint as Point ) as IPortableCursor
if ((super:View:Control astype MyRichEditControl):FormatCalculatorEnabled)
return RichEditCursors.Hand
endif
return super:Calculate(hitTestResult, physicalPoint)


end class


Another small suggestion is to convert the X# reserved keywords in UpperCase.

regards
George
User avatar
Fabrice
Posts: 463
Joined: Thu Oct 08, 2015 7:47 am
Location: France

ILspy suggestion: base instead SUPER in decompiled code

Post by Fabrice »

Hi George,
in fact this is more than a suggestion, but I think this is an issue (bug?)

About UpperCase, I will see if I can add a setting to allow user to choose between Upper/Lower/Title case

Fab
XSharp Development Team
fabrice(at)xsharp.eu
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

ILspy suggestion: base instead SUPER in decompiled code

Post by George »

Fabrice,

this is great !

George
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

ILspy suggestion: base instead SUPER in decompiled code

Post by George »

Hi Fabrice,

please check the attached sample in ILSpy with X# plug-in.

It contains, among other features, implicit operator etc. and it produces errors in translated X# code.
I think it's a good sample for the plug-in.

Please check also the right-click / Save Code as it generates a .xsproj with C# code inside as well as only .cs source output.

regards
George
Attachments
ReadEnvSample.zip
(12.5 KiB) Downloaded 199 times
User avatar
Fabrice
Posts: 463
Joined: Thu Oct 08, 2015 7:47 am
Location: France

ILspy suggestion: base instead SUPER in decompiled code

Post by Fabrice »

Hi George,
Thanks for your sample.
I had corrected the previous ones and was ready to publish, but it seems I have more Homework :)

Btw, about Casing, it is already existing : Go to view/options and check the box.

Regards
Fab
XSharp Development Team
fabrice(at)xsharp.eu
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

ILspy suggestion: base instead SUPER in decompiled code

Post by George »

I See. Thank you.

George
User avatar
Fabrice
Posts: 463
Joined: Thu Oct 08, 2015 7:47 am
Location: France

ILspy suggestion: base instead SUPER in decompiled code

Post by Fabrice »

George,
after your latest sample, it seems that I have some corrections to add, but at least you can find a new version of the plugin at the GitHub page : https://github.com/X-Sharp/ILSpy-Plugin
On the right, click on Releases, you should find the 23/12/2020 version.

Cheers,
Fab
PS : BTW, I'm also working on the ILSpy 6 version
XSharp Development Team
fabrice(at)xsharp.eu
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

ILspy suggestion: base instead SUPER in decompiled code

Post by George »

Thank you Fabrice !
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

ILspy suggestion: base instead SUPER in decompiled code

Post by George »

Fabrice,

I downloaded the code from github.com/X-Sharp/ILSpy-Plugin.
There was missing references, so using NuGet Manager I got:
- Mono.Cecil.0.10.1.0
- ICSharpCode.AvalonEdit.5.0.3.0 (manually as it doesn't exist in NuGet Browser)

and I updated all other outdated pachages like System.ComponentModel.Composition.

At the end, the only missing reference is: ILSpy
I cannot find ILSpy.4.0.1.4530
as shown in the attached file:
MissingReference.PNG
MissingReference.PNG (146.21 KiB) Viewed 2019 times
regards
George
User avatar
Fabrice
Posts: 463
Joined: Thu Oct 08, 2015 7:47 am
Location: France

ILspy suggestion: base instead SUPER in decompiled code

Post by Fabrice »

George,
I respectfully think you are making it the hard way.
At the github page, click on the Releases link on the right; then from the 3 assets, get ILSpy502.XSharpLanguage.20201223.zip, this is the compiled DLL. Then get the ILSpy 5.02, and put in the DLL in the same folder as the ILSpy.exe.

If you want to get the source and rebuild, please take care of the Branch you are viewing/downloading :
Master or ILSpy 4 are the same, and are focusing ILSpy 4: This branch has not been updated since I've moved to ILSpy5
ILSpy5: the latest I've updated
ILSpy6: Not ready now, still a work-in-progress.

HTH,
Fabrice
XSharp Development Team
fabrice(at)xsharp.eu
Post Reply