Difference between revisions of "Talk:Folding support"

(ADT)
(working title of the project)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
= general TODO =
 
= general TODO =
[[User:Sanakan|Sanakan]] 20:37, 3 May 2006 (CEST)
+
[[User:Sanakan|Sanakan]] 02:40, 18 June 2006 (CEST)<br/>
 +
* revise code hiding/showing
 +
-> assigned to: panarium, exception, sanakan
 +
* testing!!!!!
 +
-> assigned to: everyone
  
syntax: phase <nr> [<who>] <deadline>
 
  
'''phase 0''' (everyone!) saturday, may 6
 
* specify ADT
 
* generate and discuss a complete ADT of the EV_FOLDING_WIDGET here, if it's complete & correct, we can copy it over to the main page.
 
  
'''phase 1''' (stefan, oliver, thomas, [[User:Grippus|Grippus]], [[User:Sanakan|sanakan]]) saturday, may 13
+
[[User:salmanasar|salmanasar]] 13:15, 9 May 2006 (CEST)<br/>
* implement first rough draft of the EV_FOLDING_WIDGET based on the ADT from above (see also hint below).
+
  
'''phase 2''' (lukas, [[User:Bru|Bru]], [[User:Lord _Bubu|Lord Bubu]], [[User:Sanakan|sanakan]]) ...
+
I suggest, that every change in the classes is reported with a little comment (perhaps via the mailinglist), so that those of us who do part 3 and 4 are able to support the coders, as sanakan proposed.
* write interface EV_FOLDING_CONTROLLER for users to use our folding widget by supplying an AST.
+
  
'''phase 3''' ([[User:Grippus|Grippus]], [[User:Ledergec|Ledergec]], [[User:salmanasar|salmanasar]], ) ...
+
= working title of the project =
* extensive testing (all members)
+
* documentation
+
  
'''phase 4''' (to be assigned) ...
+
A few ideas:
* integration with EiffelStudio (aka. wunschtraum...)
+
* Folding -> falten -> eiffel-origami
 +
* FEES : Folding editor for Eiffel Studio
 +
* hidden beauty project
 +
* HYCs : Hide your code
 +
* Folding Fields
 +
* Heilige Dreifaltigkeit
 +
 
 +
any comments from team members?
 +
 
 +
[[User:Sanakan|Sanakan]] 22:02, 19 April 2006 (CEST)
  
= hint =
 
 
[[User:Bayt|Bayt]]
 
[[User:Bayt|Bayt]]
 +
I really like origamiE :-)
  
The folding support should be included the: EDITABLE_TEXT_PANEL
+
[[User:Bru|Bru]]
 +
origamiE is cool. Another propasal: FEdEX (Folding: an Editor EXtension or an Folding for Editors: an Eiffel eXtension)
  
[[User:Grippus|Grippus]]
+
--[[User:Salmanasar|Salmanasar]] 08:02, 19 June 2006 (CEST)
 +
just for fun, since I was frustrated of compiling Eiffel: [[Image:origamie.JPG]]
  
I agree on having those functionalities; but we do not have any changes there; i think the view (of MVC model) is resided in 57dev\Eiffel\interface\new_graphical\text_window\interface. e.g. EB_SMART_EDITOR, which inherits from EDITABLE_TEXT_PANEL (indirectly) and OUTPUT_WINDOW...
+
= Testing/Checking =
  
furthermore one should have an entrie in View -> Class View  to activate/deactivate folding support in ES. (for debugging purposes)... (unforttunately ES still won't compile properly:-(!)
+
--[[User:Salmanasar|Salmanasar]] 12:35, 13 June 2006 (CEST)
  
 +
I wrote a little Eiffel-program with which you can check if our folding-editor works:
  
[[User:Bru|Bru]] 13:00, 9 May 2006 (CEST)<br/>
+
<pre>
 +
indexing
 +
description : "System's root class, Class to test if folding editor works"
 +
author: "salmanasar"
 +
date: "11.06.2006"
 +
revision: "1.1"
  
I think we should concentrate on finally getting together a list of specs and a BON diagram or something so that we have an idea on how to implement the fracking thing as a simple EV widget before we start thinking about ES. I guess we will have some kind of controller that offers the interface to the container on one side and the displayer on the other. I still have no idea how to start, though, I will start looking at the EDITABLE_TEXT_PANEL source after these frelling midterms.
+
class
 +
ROOT_CLASS
  
[[User:salmanasar|salmanasar]] 13:15, 9 May 2006 (CEST)<br/>
+
create
 +
make
  
I suggest, that every change in the classes is reported with a little comment (perhaps via the mailinglist), so that those of us who do part 3 and 4 are able to support the coders, as sanakan proposed.
+
feature -- Initialization
  
= ADT =
+
make is
WhatWhereWhenHowWhy<br/>
+
-- Creation procedure.
[[User:Sanakan|Sanakan]] 16:59, 26 April 2006 (CEST)
+
local
 +
option : INTEGER
 +
number : INTEGER
 +
do
 +
-- Print some welcome text.
 +
io.put_string("Enter your option: {1,2,3}")
 +
io.new_line
 +
io.put_string("=========================")
 +
io.new_line
 +
io.read_integer
 +
option := io.last_integer
 +
io.new_line
 +
io.new_line
 +
io.put_string("Enter a number between 1 and 20")
 +
io.new_line
 +
io.put_string("===============================")
 +
io.new_line
 +
io.read_integer
 +
number := io.last_integer
 +
-- if to be folded
 +
if (number > 0) and (number < 21) then
 +
-- inspect to be folded
 +
inspect option
 +
  when 1 then looping(number)
 +
  when 2 then casedecision(number)
 +
  when 3 then inspecting_thing(number)
 +
 
 +
  else io.put_string("no such option!!")
 +
  end
 +
end
 +
 +
 +
 +
end
 +
 +
feature -- cases
 +
 +
looping(n: INTEGER) is
 +
-- feature with 2 loops, 1 if-then-else printing a checkered triangle
 +
local
 +
i, j, star: INTEGER
 +
do
 +
from
 +
i := 1
 +
star := 1
 +
until
 +
i > n
 +
loop
 +
from
 +
j := 1
 +
until
 +
j > i
 +
loop
 +
if j \\ 2 = star then
 +
io.put_character (' ')
 +
else
 +
io.put_character ('*')
 +
end
 +
j := j + 1
 +
end
 +
star := 1 - star
 +
i := i + 1
 +
io.put_new_line
 +
end
 +
end
 +
 +
 +
casedecision(n:INTEGER) is
 +
--  feature with if then elseif
 +
do
 +
-- if to be folded
 +
if n > 10
 +
  then io.put_string ("What a huge number!!!")
 +
  elseif n >5
 +
  then io.put_string ("What a little number!!!")
 +
  else io.put_string ("What a tiny number!!!")
 +
end
 +
end
 +
 +
inspecting_thing(n:INTEGER) is
 +
--  feature with weird inspecting thing
 +
do
 +
-- inspect to be folded
 +
inspect n
 +
  when 1 then io.put_string ("one")
 +
  when 2 then io.put_string ("two")
 +
  when 3 then io.put_string ("three")
 +
  when 4 then io.put_string ("four")
 +
  when 5 then io.put_string ("five")
 +
  when 6 then io.put_string ("six")
 +
  when 7 then io.put_string ("seven")
 +
  when 8 then io.put_string ("eight")
 +
  else io.put_string ("too big")
 +
  end
 +
end
  
discuss what the ADT of the widget should be like:<br/>
 
  
  
 +
end -- class ROOT_CLASS
 +
</pre>
 +
 +
 +
= ADT: general Talk =
 
[[User:Exception|Exception]] 14:45, 4 May 2006 (CEST)<br/>
 
[[User:Exception|Exception]] 14:45, 4 May 2006 (CEST)<br/>
 
I think we need another data type / class that specifies where folding is possible and whether it's folded or not. I propose the name '''EV_FOLDING_AREA'''.<br>
 
I think we need another data type / class that specifies where folding is possible and whether it's folded or not. I propose the name '''EV_FOLDING_AREA'''.<br>
Line 76: Line 189:
 
How does Eiffel implement text as a sequence of characters? line by line? That will greatly influence our implementation of the folding widget I guess. A "folding area" will then contain the lines themselves and the start and end coordinates of the area, so that when the displayer draws the editor area it gets those coordinates from the folding controller and doesn't display those lines but puts a symbol there instead. Just thinking out loud here...
 
How does Eiffel implement text as a sequence of characters? line by line? That will greatly influence our implementation of the folding widget I guess. A "folding area" will then contain the lines themselves and the start and end coordinates of the area, so that when the displayer draws the editor area it gets those coordinates from the folding controller and doesn't display those lines but puts a symbol there instead. Just thinking out loud here...
  
 +
= ADT =
 +
moved from front-page<br/>[[User:Sanakan|Sanakan]] 02:40, 18 June 2006 (CEST)<br/>
  
 +
NOTE: to be revised!
 +
==Types==
 +
FOLDING_WIDGET, TEXT_BLOCK, INTEGER, BOOLEAN,
  
--[[User:Unthomas|Unthomas]] 14:05, 1 May 2006 (CEST) <br/>
+
==Features==
Here a link to an interesting paper about ADTs and text editors (node 15):
+
http://www.cs.unm.edu/~crowley/papers/sds/sds.html <br/>
+
Are you able to see the figures?
+
  
: no images over here, either... but here's a download of said paper: [http://citeseer.ist.psu.edu/rd/0%2C162545%2C1%2C0.25%2CDownload/http://citeseer.ist.psu.edu/compress/0/papers/cs/1797/http:zSzzSzwww.bolthole.comzSzjwordzSzwppaper.ps.gz/crowley98data.ps crowley98data.ps]<br/>[[User:Sanakan|Sanakan]] 01:06, 2 May 2006 (CEST)
+
new -> FOLDING_WIDGET<br/>
 +
definearea: FOLDING_WIDGET X HIGHLIGHTED_TEXT_BLOCK -> FOLDING_WIDGET<br/>
 +
from: FOLDING_WIDGET -> INTEGER<br/>
 +
to: FOLDING_WIDGET -> INTEGER<br/>
 +
folded: FOLDING_WIDGET -> BOOLEAN<br/>
 +
fold: FOLDING_WIDGET -> FOLDING_WIDGET<br/>
 +
unfold: FOLDING_WIDGET -> FOLDING_WIDGET<br/>
 +
content: FOLDING_WIDGET -> BLOCK<br/>
 +
numberoflines: FOLDING_WIDGET -> INTEGER<br/>
  
= working title of the project =
+
==Prerequisites==
 +
none
  
A few ideas:
+
==Axioms==
* Folding -> falten -> eiffel-origami
+
* FEES : Folding editor for Eiffel Studio
+
* hidden beauty project
+
* HYCs : Hide your code
+
* Folding Fields
+
* Heilige Dreifaltigkeit
+
  
any comments from team members?
+
for all w,v :: FOLDING_WIDGET, tb :: TEXT_BLOCK
  
[[User:Sanakan|Sanakan]] 22:02, 19 April 2006 (CEST)
 
  
[[User:Bayt|Bayt]]
+
from(definearea(w,tb)) = firstline(tb)
I really like origamiE :-)
+
to(definearea(w,tb) = lastline(tb)  
 
+
content(new) = NULL
[[User:Bru|Bru]]
+
content(definearea(w,tb)) = tb
origamiE is cool. Another propasal: FEdEX (Folding: an Editor EXtension or an Folding for Editors: an Eiffel eXtension)
+
numberoflines(new) = 0
 +
numberoflines(definearea(w,tb)) = to(definearea(w,tb)) - from(definearea(w,tb))
 +
folded(new) = false
 +
folded(fold(w)) = true

Latest revision as of 22:03, 18 June 2006

general TODO

Sanakan 02:40, 18 June 2006 (CEST)

  • revise code hiding/showing

-> assigned to: panarium, exception, sanakan

  • testing!!!!!

-> assigned to: everyone


salmanasar 13:15, 9 May 2006 (CEST)

I suggest, that every change in the classes is reported with a little comment (perhaps via the mailinglist), so that those of us who do part 3 and 4 are able to support the coders, as sanakan proposed.

working title of the project

A few ideas:

  • Folding -> falten -> eiffel-origami
  • FEES : Folding editor for Eiffel Studio
  • hidden beauty project
  • HYCs : Hide your code
  • Folding Fields
  • Heilige Dreifaltigkeit

any comments from team members?

Sanakan 22:02, 19 April 2006 (CEST)

Bayt I really like origamiE :-)

Bru origamiE is cool. Another propasal: FEdEX (Folding: an Editor EXtension or an Folding for Editors: an Eiffel eXtension)

--Salmanasar 08:02, 19 June 2006 (CEST) just for fun, since I was frustrated of compiling Eiffel: Origamie.JPG

Testing/Checking

--Salmanasar 12:35, 13 June 2006 (CEST)

I wrote a little Eiffel-program with which you can check if our folding-editor works:

indexing
	description	: "System's root class, Class to test if folding editor works"
	author: "salmanasar"
	date: "11.06.2006"
	revision: "1.1"

class
	ROOT_CLASS

create
	make

feature -- Initialization

	make is
			-- Creation procedure.
		local
			option : INTEGER
			number : INTEGER
		do
			-- Print some welcome text.
			io.put_string("Enter your option: {1,2,3}")
			io.new_line
			io.put_string("=========================")
			io.new_line
			io.read_integer
			option := io.last_integer
			io.new_line
			io.new_line
			io.put_string("Enter a number between 1 and 20")
			io.new_line
			io.put_string("===============================")
			io.new_line
			io.read_integer
			number := io.last_integer
			-- if to be folded
			if (number > 0) and (number < 21) then
				-- inspect to be folded
	 			inspect option
  				when 1 then looping(number)
  				when 2 then casedecision(number)
  				when 3 then inspecting_thing(number)
  					
  				else io.put_string("no such option!!")
  				end
			end
			 
			
			
		end
		
feature -- cases
	
	looping(n: INTEGER) is
			-- feature with 2 loops, 1 if-then-else printing a checkered triangle
		local
			i, j, star: INTEGER
		do
			from
				i := 1
				star := 1
			until
				i > n
			loop
				from 
				 	j := 1
				until
					j > i
				loop
					if j \\ 2 = star then
						io.put_character (' ')
					else 
					 	io.put_character ('*')
					end
					j := j + 1
				end
				star := 1 - star
				i := i + 1
				io.put_new_line
			end 
		end
		
	
	casedecision(n:INTEGER) is
			--  feature with if then elseif
		do 
			-- if to be folded
			if n > 10
   				then io.put_string ("What a huge number!!!")
   			elseif n >5 
   				then io.put_string ("What a little number!!!")
   			else io.put_string ("What a tiny number!!!")
			end
		end
		
	inspecting_thing(n:INTEGER) is
			--  feature with weird inspecting thing
		do 
				-- inspect to be folded
	 			inspect n
  				when 1 then io.put_string ("one")
  				when 2 then io.put_string ("two")
  				when 3 then io.put_string ("three")
  				when 4 then io.put_string ("four")
  				when 5 then io.put_string ("five")
  				when 6 then io.put_string ("six")
  				when 7 then io.put_string ("seven")
  				when 8 then io.put_string ("eight")
  				else io.put_string ("too big")
  				end
		end



end -- class ROOT_CLASS


ADT: general Talk

Exception 14:45, 4 May 2006 (CEST)
I think we need another data type / class that specifies where folding is possible and whether it's folded or not. I propose the name EV_FOLDING_AREA.

it should have the following functions:
create: -> EV_FOLDING_AREA
the area goes from this character on.
from: EV_FOLDING_AREA -> INTEGER
the area goes from this character on.
to: EV_FOLDING_AREA -> INTEGER
the area goes until this character.
folded: EV_FOLDING_AREA -> BOOLEAN
is it folded or not?
fold: EV_FOLDING_AREA -> EV_FOLDING_AREA
fold the area.
unfold: EV_FOLDING_AREA -> EV_FOLDING_AREA
unfold the area.
content: EV_FOLDING_AREA x EV_FOLDING_WIDGET -> STRING
the content of the area.

the structure would be controlled by the controller which knows of the AST.

as always, this is only a proposal.


Bru 13:03, 9 May 2006 (CEST)

How does Eiffel implement text as a sequence of characters? line by line? That will greatly influence our implementation of the folding widget I guess. A "folding area" will then contain the lines themselves and the start and end coordinates of the area, so that when the displayer draws the editor area it gets those coordinates from the folding controller and doesn't display those lines but puts a symbol there instead. Just thinking out loud here...

ADT

moved from front-page
Sanakan 02:40, 18 June 2006 (CEST)

NOTE: to be revised!

Types

FOLDING_WIDGET, TEXT_BLOCK, INTEGER, BOOLEAN,

Features

new -> FOLDING_WIDGET
definearea: FOLDING_WIDGET X HIGHLIGHTED_TEXT_BLOCK -> FOLDING_WIDGET
from: FOLDING_WIDGET -> INTEGER
to: FOLDING_WIDGET -> INTEGER
folded: FOLDING_WIDGET -> BOOLEAN
fold: FOLDING_WIDGET -> FOLDING_WIDGET
unfold: FOLDING_WIDGET -> FOLDING_WIDGET
content: FOLDING_WIDGET -> BLOCK
numberoflines: FOLDING_WIDGET -> INTEGER

Prerequisites

none

Axioms

for all w,v :: FOLDING_WIDGET, tb :: TEXT_BLOCK


from(definearea(w,tb)) = firstline(tb) to(definearea(w,tb) = lastline(tb) content(new) = NULL content(definearea(w,tb)) = tb numberoflines(new) = 0 numberoflines(definearea(w,tb)) = to(definearea(w,tb)) - from(definearea(w,tb)) folded(new) = false folded(fold(w)) = true