Pages: [1]   Go Down

Author Topic: Contextual menu extension to reindent parameter lists  (Read 3918 times)

OS923

  • Platinum Member
  • *****
  • Offline Offline
  • Posts: 888
Contextual menu extension to reindent parameter lists
« on: December 02, 2019, 08:27:50 AM »

I wrote a contextual menu extension to reindent parameter lists.

Before:
Code: [Select]
Bool Read(n1 x,
       n1 y,
             n1 z)
{
    if (!Read("\pInput (many)",
                m_save,
           k))
        {
        Return_false("\pError (-110)",
                       k);
        }
    /* Test(a,
          b); */
    Test(a,
       b);
    // Test(a,
    //    b);
    Test(a,
      b);
    Test(A(x,
      y),
             B(z,
                 w));
    return True;
}

After:
Code: [Select]
Bool Read(n1 x,
          n1 y,
          n1 z)
{
    if (!Read("\pInput (many)",
              m_save,
              k))
        {
        Return_false("\pError (-110)",
                     k);
        }
    /* Test(a,
          b); */
    Test(a,
         b);
    // Test(a,
    //    b);
    Test(a,
         b);
    Test(A(x,
           y),
         B(z,
           w));
    return True;
}

At this moment it contains 512 K of zeroes.
I'll try to make a smaller version.
Logged

OS923

  • Platinum Member
  • *****
  • Offline Offline
  • Posts: 888
Re: Contextual menu extension to reindent parameter lists
« Reply #1 on: December 08, 2020, 11:03:01 AM »

See the smaller version in the attachment.
Logged

OS923

  • Platinum Member
  • *****
  • Offline Offline
  • Posts: 888
Re: Contextual menu extension to reindent parameter lists
« Reply #2 on: December 23, 2020, 04:31:37 AM »

Zero downloads? That’s one of my best softwares ever.
Logged

Daniel

  • Gold Member
  • *****
  • Offline Offline
  • Posts: 302
  • Programmer, Hacker, Thinker
Re: Contextual menu extension to reindent parameter lists
« Reply #3 on: December 23, 2020, 08:51:04 AM »

Sadly, our greatest achievements are often completely useless for end users.
Logged

Jubadub

  • Gold Member
  • *****
  • Offline Offline
  • Posts: 382
  • New Member
Re: Contextual menu extension to reindent parameter lists
« Reply #4 on: December 25, 2020, 05:50:52 AM »

What are parameter lists used for? What are the benefits of reindenting them?

Depending on the answers to these 2 questions, it may get a lot more downloads. :)

EDIT: Typo fix.
« Last Edit: December 25, 2020, 08:58:37 AM by Jubadub »
Logged

OS923

  • Platinum Member
  • *****
  • Offline Offline
  • Posts: 888
Re: Contextual menu extension to reindent parameter lists
« Reply #5 on: December 25, 2020, 07:22:39 AM »

A parameter list is a part of a function prototype or a function call in a programming language. (This forum is about programming, remember?) We like to place the parameters neatly in one column, one parameter per line. This costs effort typing many spaces, so it’s helpful when this is done automatically.
Logged

Jubadub

  • Gold Member
  • *****
  • Offline Offline
  • Posts: 382
  • New Member
Re: Contextual menu extension to reindent parameter lists
« Reply #6 on: December 25, 2020, 09:04:03 AM »

I see, a parameter list, as in, the list of arguments to be passed onto a method within code in a text file of your choosing. For general code text identation. I see, my bad for not looking at the "Before" and "After" boxes carefully.

Yeah, that's cool, although I would personally not split my parameters with one per line... But still, that's a nice little CM. Does the ".sitx" also include the source?
Logged

OS923

  • Platinum Member
  • *****
  • Offline Offline
  • Posts: 888
Re: Contextual menu extension to reindent parameter lists
« Reply #7 on: December 25, 2020, 09:10:21 AM »

No, no source.
Logged

OS923

  • Platinum Member
  • *****
  • Offline Offline
  • Posts: 888
Re: Contextual menu extension to reindent parameter lists
« Reply #8 on: January 21, 2021, 07:31:27 AM »

There’s a bug where it doesn’t save the new text because the length is the same. There’s a small chance that this happens. This is already fixed for the next version.
Logged
Pages: [1]   Go Up
 

Recent Topics