PED Editor Suggestion

Text Fold

RichardT
Benutzer
Avatar
Gender:
Age: 55
Posts: 19
Registered: 02 / 2013
Subject:

PED Editor Suggestion

 · 
Posted: 21.10.2013 - 20:44  ·  #1
To the e-lab team

This is just a suggestion on how to make long code more readable and easier to work with:

Quit a few years ago I worked with a HLL called OCCAM (similar to Pascal, developed by Inmos, UK) wich had a handy function in its editor. One was able to create a "fold" with code inside. This fold would have a heading or short description. For Pascal such a fold could typically contain an entire procedure and its name could be the heading. This way the line count is dramatically reduced. The folds are easy to create with just a hotkey and can be closed :3some: or opened at any time.

Would such a function be feasible?

PS: Your AVRCO system is just great.

Just my 5c

Richard T
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2077
Registered: 03 / 2003
Subject:

Re: PED Editor Suggestion

 · 
Posted: 22.10.2013 - 09:14  ·  #2
Hallo Rolf,

das wäre eine echt geniale Idee: Die PED erkennt eine Funktion (Begin/End) und mit einem Button neben der Titelzeile kann man den Code ein/ausblenden. Der Titel bleibt natürlich stehen.

Gruss
Harry
miparo
Administrator
Avatar
Gender:
Location: Germany
Age: 59
Posts: 953
Registered: 09 / 2007
Subject:

Re: PED Editor Suggestion

 · 
Posted: 22.10.2013 - 10:20  ·  #3
Hi Harry,
das nennt sich Code Folding
Code Folding

und ist nicht trival.
Da wird schon seit Jahren dran gebastelt im SynEdit, worauf der PED setzt und perfekt ist das immer noch nicht. Abhilfe schafft man nur mit vielen kleinen Units :yawinkle:
Aber schön sieht es aus.

Gruß
miparo
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2077
Registered: 03 / 2003
Subject:

Re: PED Editor Suggestion

 · 
Posted: 22.10.2013 - 13:23  ·  #4
Hi miparo,

so schlimm kann das doch nicht sein oder ? Es wird das Schlüsselwort "Procedure", "Function", "Process" oder sonstwas erkannt und der nachfolgende Text bis zum "End" ausgeblendet. Der Compiler erkennt doch auch fehlende Begin....End - wieso die PED nicht ?

Gruss
Harry
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: PED Editor Suggestion

 · 
Posted: 22.10.2013 - 13:29  ·  #5
@all,
this is not trivial. Delphi for example knows within a millisecond what the compiler
makes while you are writung. This is called the "incremental compile". We don't
have this. So the IDE is only updated after each compile run and then it knows
something about the relations of the source lines etc.
This is because we don't have a parser etc. in the editor. Sorry...

@Harry,
the begin..end is not recognized by the editor, see above.
Only the the highlighter makes words bold etc.

rolf
pvs-deck
PowerUser
Avatar
Gender:
Age: 52
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: PED Editor Suggestion

 · 
Posted: 22.10.2013 - 13:31  ·  #6
Quote by Harry

Hi miparo,

so schlimm kann das doch nicht sein oder ? Es wird das Schlüsselwort "Procedure", "Function", "Process" oder sonstwas erkannt und der nachfolgende Text bis zum "End" ausgeblendet. Der Compiler erkennt doch auch fehlende Begin....End - wieso die PED nicht ?

Gruss
Harry


Das hatte ich vor einiger Zeit ca. 2-3 Jahre auch schon mal hier im Forum nachgefragt :(

Ich nutze deswegen das UEStudio zum arbeiten mit AVRco, da mir das Auf- und Zuklappen eine sehr wichtige Funktion ist. Nachteil viele fertige Funktionen muss man über Batchroutinen selbst anstoßen. Besser ist hier natürlich eine PED-Funktion.

Gruss
Thorsten
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 14 · Cache Hits: 14   108   122 · Page-Gen-Time: 0.021649s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI