Welcome, Guest
Username: Password: Remember me
Please use this forum for suggestions to the XSharp Development Team
  • Page:
  • 1

TOPIC:

ILspy suggestion: base instead SUPER in decompiled code 16 Dec 2020 09:58 #16948

  • George


  • Posts: 106
  • 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

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 16 Dec 2020 23:10 #16959

    • Fabrice
    • Fabrice's Avatar


  • Posts: 111
  • 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

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 17 Dec 2020 01:55 #16960

    • George


  • Posts: 106
  • Fabrice,

    this is great !

    George

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 23 Dec 2020 09:37 #16995

    • George


  • Posts: 106
  • 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

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 23 Dec 2020 09:41 #16996

    • Fabrice
    • Fabrice's Avatar


  • Posts: 111
  • 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

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 23 Dec 2020 09:51 #16997

    • George


  • Posts: 106
  • I See. Thank you.

    George

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 23 Dec 2020 22:42 #17001

    • Fabrice
    • Fabrice's Avatar


  • Posts: 111
  • 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 : 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

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 09:12 #17002

    • George


  • Posts: 106
  • Thank you Fabrice !

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 11:39 #17004

    • George


  • Posts: 106
  • 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:



    regards
    George

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 13:01 #17005

    • Fabrice
    • Fabrice's Avatar


  • Posts: 111
  • 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

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 14:52 #17006

    • George


  • Posts: 106
  • Ok. Thanks.

    But, the 'impilict operator' still produce errors (I am using the last compiled ILSpy.XSharpLanguage.Plugin.dll):



    regards
    George

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 16:13 #17007

    • Fabrice
    • Fabrice's Avatar


  • Posts: 111
  • Yes,
    sorry but I've seen that with the sample you've send (And few other issues too).
    I will try to correct asap... My XMas gift ;)

    Cheers,
    Fab

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 16:52 #17008

    • George


  • Posts: 106
  • Fabrice,

    fine!.

    mary xmas,
    George

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 18:08 #17009

    • Fabrice
    • Fabrice's Avatar


  • Posts: 111
  • George,
    your present is under the XMas Tree ;)
    Go to Releases, and get the 20201224 version : It should solved the OPERATOR syntax

    Cheers,
    Fab

    Please Log in or Create an account to join the conversation.

    ILspy suggestion: base instead SUPER in decompiled code 24 Dec 2020 18:46 #17010

    • George


  • Posts: 106
  • Thank you Fabrice.

    I got the present!

    George

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1