Anjuta Snippets Manager - weekly report #7
- From: Dena Dragos <dragos dena gmail com>
- To: jhs gnome org, gnome-soc-list gnome org, anjuta-devel-list gnome org
- Subject: Anjuta Snippets Manager - weekly report #7
- Date: Sun, 11 Jul 2010 19:03:29 +0300
Hey everyone,
The weekly report can also be viewed on my blog [1] and the source
code can be found on github [2].
* What have I done this week ?
I'm not 100% done yet with the editor, but now I only have some
minor details that I have to implement. In the last 2 weeks I went
trough 3 layout's for the editor, being helped by Johannes suggestions
so I can clean it up a bit. Will present all 3 of them, as it may be
interesting to see how it evolved (and how I learnt a few things about
how the layout should look). For those that can't remember where the
editor should have been place, you can see the screenshot [3].
> The first one looked like this [4].
I only have the screenshot from Glade with it, since I didn't
actually got to import it. Besides the fact that I didn't aligned the
entries (which could of been fixed), the main problem was that I had a
notebook there and the UI was getting a bit heavy. The plan was to
focus on one of the first 2 tabs depending on what you had selected (a
group or a snippet) in the Snippets Browser which was attached. The
3rd one was there to edit global variables of course (which are now
called "Anjuta variables").
> In the second one, I gave up on the notebook (not to mention
that I aligned the entries) [5].
At the time I took the screenshot I didn't had anything
implemented for the editor (except the model for the variables tree
view there), but the functionality wasn't changed. The other 2 tabs:
snippets group and global variables were dropped. The Snippets Group
name is now editable from the browser. I also had a description field
for the snippets group which I wanted to display as a tooltip, but
having a special tab just for that was a bit pointless. The global
variables editor was moved (again) to the preferences window, so the
notebook wasn't needed anymore.
> Now, the third and current version looks like this [6].
There isn't a frame anymore around the editor, things were moved
around a bit and I think I have proper padding and sizing for the
items in the editor. As a note, the content shown there is in preview
mode - the preview button is a toggle one and while in preview mode,
the variables are evaluated and the text view isn't editable. As
another note, the GtkTextView will be changed with a GtkSourceView
when I will finish with some more important stuff. There will be a
highlighting scheme for the snippet (so it will highlight variables)
and while in preview mode it will show the resulting content with the
highlighting scheme of one of the languages supported by the snippet.
The combo box for the languages has 2 cell renderers: a checkbox
and a text one - the language, so it will let you choose one or more
languages for which the snippet is meant.
The variables tree view on the right is there for a better
management of variables and to avoid some frustrating moments. By the
last thing I refer to the following situation: let's say a user has in
the content of the snippet the text ${some_text}, which would mean a
variable with the current syntax. If I wouldn't hold references to the
variables which are used, I couldn't have a way to detect what the
user meant with that string (though in 99% of the cases it would be a
variable, but still ... you never know). Right now, if I don't find a
reference to the variable "some_text" then I will just print out the
string ${some_text} when evaluating the snippet. As a matter of fact,
if "var" is a referenced snippet variable and it has it's default
value "default", then "${some ${var} text}" will get evaluated to
"${some default text}".
On my blog I also have a brief presentation of the variables tree
view, but this is getting a bit heavy here, so will just post the
screenshot [7].
* What will I do next week ?
Not sure what I will do for next week, but will mention some of
the goals, though they won't take me all the week:
> Implement error detection in the editor, like: if the trigger
already exists for one of the selected languages a warning icon should
appear, if the user hasn't chosen a group for a new snippet or any
language should also show an warning icon (these are to be shown next
to the 2 combo-boxes). This will not allow the user to save the
snippet.
> Show a warning dialog if the user made changes and didn't saved them.
> When changing the name of a variable in the tree view I should
also change it in the content.
> Clean up the preferences layout and actually implement some of
the stuff there.
[1] http://dragos-dena.blogspot.com/2010/07/anjuta-snippets-plugin-weekly-report-7.html
[2] http://github.com/dragos-dena/Anjuta-Snippets-Plugin
[3] http://1.bp.blogspot.com/_686kVBsV-R8/TCi5i6CTzkI/AAAAAAAACpM/AX2V9C9DUy0/s1600/snippets_browser_shown_editor.png
[4] http://3.bp.blogspot.com/_686kVBsV-R8/TDnL5BQ3fPI/AAAAAAAACpU/rP-KU3zZUjQ/s1600/snippet_edit.png
[5] http://3.bp.blogspot.com/_686kVBsV-R8/TDnOzJevoyI/AAAAAAAACpk/gEkYJKlnJ-o/s1600/editor_shown.png
[6] http://3.bp.blogspot.com/_686kVBsV-R8/TDnSq1Fwx7I/AAAAAAAACps/zqjOgNGVlBA/s1600/new_layout.png
[7] http://3.bp.blogspot.com/_686kVBsV-R8/TDnZsEUXSdI/AAAAAAAACp0/ZUHKdT5mI9U/s1600/variables_tree_view.png
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]