[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    Re: [quanta-devel] Annotation support
From:       Jens Herden <jens () kdewebdev ! org>
Date:       2005-04-23 1:26:14
Message-ID: 200504230826.15003.jens () kdewebdev ! org
[Download RAW message or body]

Hi Andras,

>  I've talked a little with Eric about annotation support in Quanta. 

I have not seen this on the list, so I think this was private. What a pity 
because now I am in the role of the complainer again :-( 

>  This means you can assign comments to documents (to specific lines in the
> documents). The comments can be browsed in a new toolview. 

What is the difference between annotation and comment? I don't see one. Adding 
comments to a file is not a really new concept, but browsing them is.

> Now I implemented this. The current implementation should be taken as an
> alpha, as it has known issues I will list below.
> So what it can do is:
> - in the editor context menu there is an Annotate entry that can be used
> to enter annotation text
> - the text is saved in an XML file called filename.annotation
> - every line that has an annotation will have a "stamp" mark in the icon
> border.
> - there is a new Annotations view (again the icon is a stamp, do you
> have better idea?) which has 3 tabs:
>  Current file: lists the annotations in the current file
>  All files: lists the annotations (with the comment text as well) for
> all files from the project
>  Annotated files: a list of files which have annotations in the project
> - double-clicking on an item brings you to the file/line where the
> annotation is (except for the 3rd tab, where will bring you to the
> file, but line 1)
> - should work for local and remote projects as well

I like the idea of making comments more visible but frankly spoken the 
implementation is very poor. 

First of all. The idea of storing information in two different files that 
belong to each other is very bad. Think about copy and move of the textfile. 
You will be forced to do it in Quanta if you want the comment-file moved and 
copied as well. Think about other editors than Quanta, let's say I open a 
file in Kate and insert some lines in the textfile. Either the relation 
between comments and linenumbers is instantly broken or your comments-file 
must know about the content and not only the linenumber. (I don't know what 
you are doing, I did not look into the code)

All this brought people to invent tools like Doxygen, so that you can comment 
your code inside of the document. 

So what are the problems you want to solve?

1. You want to browse the annotations of one file and be able to jump to a 
line.
We have this concept already, it is called structure tree and I see no problem 
in adding a subtree for comments there. 

2. You don't want to see all comment, just the important one.
Lets use a kind of tag system to filter the important one out. (like 
@annotation inside of the comment or so)

3. You want to have all comments inside of the project available. 
This would mean parsing all files in the project and would suggest to do this 
when we move to KDevelop. There should be some kind of background parsing. 
The result should be stored in the project file not in the filesystem so that 
on startup no rescan is necessary.

4. You don't want to see your comments during normal editing, just the icon as 
hint. 
This could be something that might Kate implement inside of the code folding 
stuff. Just always fold comments away and give a tooltip if you stay over the 
folded block. Otherwise Quanta could hide it form the editor. But my favorite 
solution would be a action in Kate to hide/show all comments. 

> Issues:
> - annotations can be deleted only if you edit them and remove the text
> in the annotation editor. I will either put a Clear button to the
> editor or offer some other way to remove an annotation.
> - switching in the annotation view to All files/Annotated files can be
> slow for large or remote projects as all the files are rescanned. This
> will be improved.
> - the annotation view is a little stupid, as it uses the standard
> Messages output widget. So the context menus should be improved, and
> the filename/line information as well. I want to add Edit/Remove
> Annotation to the menu for Current File and All files tabs.
> - it *may* leave some quanta* temporary files in /tmp/kde-username, so
> please test it.
>
> Ideas, comments are welcome. Eric, what do you think? How should we
> continue? You told me about some kind of integration with team support
> and event actions, so please explain when you have time.

I think we should drop this implementation and think about another approach to 
get what you want. Don't invent new features for problems that are already 
solved but improve the handling of the current solution is the way to go.

And I have to go now to a meeting. 

Jens
_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic