Four Js Development Tools Forum

Discussions by product => Genero Studio => Topic started by: Tim S. on December 15, 2011, 11:27:06 pm



Title: Code Editor feature request - Fold comment sections
Post by: Tim S. on December 15, 2011, 11:27:06 pm
We keep large comment sections at the top of our code to describe the module and the various changes.
It would be nice to be able to fold these and any other groups of comments at certain points in time.
It would also be handy to have a special option for Fold/Unfold All comments.

Thanks
Tim Sodowsky


Title: Re: Code Editor feature request - Fold comment sections
Post by: Reuben B. on December 21, 2011, 10:41:11 am
I'll bump this to try and get a reply from the Studio team.

I've certainly seen a number of sites with large copyright notices at the top of their source files where it would be nice to be able to fold those away so that you didn't have to hit Page Down every time you opened a file.

Also I had a suggestion a while back for the folding around FUNCTIONS to include the comments above them, particularly when using the Source Documentation Generator.  Using this example here https://4js.com/online_documentation/fjs-fgl-manual-html/User/AutoDoc.html#COMMENTING_FUNCTION
Code
  1. #+ Compute the amount of the orders for a given customer
  2. #+
  3. #+ This function calculates the total amount of all orders for the
  4. #+ customer identified by the cust_id number passed as parameter.
  5. #+
  6. #+ @code
  7. #+ DEFINE total DECIMAL(10,2)
  8. #+ CALL total = ordersTotal(r_customer.cust_id)
  9. #+
  10. #+ @param cid Customer identifier
  11. #+
  12. #+ @return The total amount as DECIMAL(10,2)
  13. #+
  14. FUNCTION ordersTotal(cid)
  15.   DEFINE cid INTEGER
  16.   DEFINE ordtot DECIMAL(10,2)
  17.   SELECT SUM(ord_amount) INTO ordtot
  18.        FROM orders WHERE orders.cust_id = cid
  19.   RETURN ordtot
  20. END FUNCTION

...currently you can only fold 14-20.  Whilst I was thinking folding 01-20 in one hit, having 01-13 and 14-20 foldable would be OK, and probably more feasible.

Reuben