Closed GoogleCodeExporter closed 8 years ago
Sorry for posting this issue here instead of in the main issue tracker. I saw
now
that I should post there issues related to bundled plugins.
Original comment by igor.dejanovic@gmail.com
on 15 May 2009 at 9:15
Hello,
1) You should derive a new type of Code/Scope object for new elements.
class MetaType(Scope):
def __init__(self, name, line, scope=None):
Scope.__init__(self, name, line, "metatype", scope)
Or if you need the extensions in Class then derive from class. On a quick
review it
would be good to add a setter to Code for the 'type' attribute. So the type id
can be
changed easily (i.e the "metatype" argument in the above example).
2) The codebrowser tree should probably not use the AppendClass method at all
anymore, I will look at updating this, it should use the generic methods now
instead.
AppendClass is left over from the early drafts and just hasn't been removed...
Thanks,
Cody
Original comment by CodyPrec...@gmail.com
on 15 May 2009 at 12:11
Hi Cody.
Yes, that was what I have tried first but I haven't figure out how to define
icon for
a type. I would like to reuse icon for class type but I don't see what would be
the
straightforward way to do that.
GenerateTags returns only document structure without any visual properties
which is
good, but what would be the best way to define type visual properties (only
icon in
this case).
Thanks,
Igor
Original comment by igor.dejanovic@gmail.com
on 15 May 2009 at 1:06
Hello,
Set the association in the CodeBrowsers, _SetupImageList function in
cbrowser.py.
Looking at this it may also be better to change how this is done, to look at the
object type instead of its string type and use introspection to walk up the
objects
class hierarchy to select the appropriate icon.
I can look at this too sometime, so if you want to just add the association in
the
way it is done now that is fine.
Cody
Original comment by CodyPrec...@gmail.com
on 15 May 2009 at 1:31
Hello,
I remember why AppendClass is still there now, its for sorting reasons. All the
existing doc generators would need to be updated to use the SetElementPriority
method
before removing it so the sorting would be correct.
I added a check in the icon setting to use the Class icon for all object that
derive
from class that do not have another specialized icon set.
Closing this issue, if you have any further questions please feel free to ask
on the
forum or mailing list.
Thanks,
Cody
Original comment by CodyPrec...@gmail.com
on 15 May 2009 at 11:49
Cody,
You made a typo in _GetIconIndex (impg -> img).
Best regards,
Igor
Original comment by igor.dejanovic@gmail.com
on 16 May 2009 at 7:07
oh my,
fixed
cody
Original comment by CodyPrec...@gmail.com
on 16 May 2009 at 1:46
Original issue reported on code.google.com by
igor.dejanovic@gmail.com
on 15 May 2009 at 8:51Attachments: