[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: "Enable auto indent on paste" feature and Ctrl-I corrupts formatting

  • Thread starter Thread starter jadamski413@gmail.com
  • Start date Start date
Status
Not open for further replies.
J

jadamski413@gmail.com

Guest
Unfortunately, this does not solve my problem. I will try to explain this (sorry for poor English). In this example (VIEW NR 1) I have "IF" block (6 first lines). I want to move (or to copy) it in place where the comment is. =================================================================== // VIEW NR 1 if xType = 'A' then do: xPrice = 1. end. else do: xPrice = 2. end. find first Customer where Customer.CustName = pCustName no-lock no-wait no-error. if avail Customer then do: find last Invoice where Invoice.CustId = Customer.CustId no-lock no-wait no-error. if avail Invoice then do: find first InvoiceItem where InvoiceItem.InvId = Invoice.InvId no-lock no-wait no-error. if avail InvoiceIten then do: /* Here I'd like to insert an "if" block from the beginning of the procedure */ if xType = 'B' then do: xPrice = 3. end. else do: xPrice = 2. end. end. end. end. =================================================================== I select the first 6 lines, I do Ctrl-X, and in place where the comment is I do Ctrl-V. After Ctrl-V, I'd like to receive something like this: =================================================================== // VIEW NR 2 find first Customer where Customer.CustName = pCustName no-lock no-wait no-error. if avail Customer then do: find last Invoice where Invoice.CustId = Customer.CustId no-lock no-wait no-error. if avail Invoice then do: find first InvoiceItem where InvoiceItem.InvId = Invoice.InvId no-lock no-wait no-error. if avail InvoiceIten then do: if xType = 'A' then do: xPrice = 1. end. else do: xPrice = 2. end. if xType = 'B' then do: xPrice = 3. end. else do: xPrice = 2. end. end. end. end. =================================================================== In this example above (VIEW NR 2) block "IF" is properly indented. But if I turn-off "Enable auto indent on paste", I'll get: =================================================================== // VIEW NR 3 find first Customer where Customer.CustName = pCustName no-lock no-wait no-error. if avail Customer then do: find last Invoice where Invoice.CustId = Customer.CustId no-lock no-wait no-error. if avail Invoice then do: find first InvoiceItem where InvoiceItem.InvId = Invoice.InvId no-lock no-wait no-error. if avail InvoiceIten then do: if xType = 'A' then do: xPrice = 1. end. else do: xPrice = 2. end. if xType = 'B' then do: xPrice = 3. end. else do: xPrice = 2. end. end. end. end. =================================================================== Now, if I press Ctrl-I in indented block I'll get: =================================================================== // VIEW NR 3 find first Customer where Customer.CustName = pCustName no-lock no-wait no-error. if avail Customer then do: find last Invoice where Invoice.CustId = Customer.CustId no-lock no-wait no-error. if avail Invoice then do: find first InvoiceItem where InvoiceItem.InvId = Invoice.InvId no-lock no-wait no-error. if avail InvoiceIten then do: if xType = 'A' then do: xPrice = 1. end. else do: xPrice = 2. end. if xType = 'B' then do: xPrice = 3. end. else do: xPrice = 2. end. end. end. end. =================================================================== Command Ctrl-I move the "DO:" block to next line, what is unreadable for me. In the examples above, green color indicates a proper operation In "ProVision" v 9.1 Procedure Editor has only few options, but veru usefull: In presented screens this options are set properrly for my needs. 1. (Options -> Editing options) check "Syntax expansion" and "Syntax indent" 2. (Options -> Editing options -> Language options) I can define DO/END Style My favourite is "Style 1". I also check options shown in the picture. This setting causes the Ctrl-C (Ctrl-X) / Ctrl-V combination to work properly Can I set Developer Studio the same way, also for Ctrl-I keys - so that it does not move the "DO:" block to a new line?

Continue reading...
 
Status
Not open for further replies.
Back
Top