Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

DDD-like watches

<< < (9/10) > >>

m.29:
I know what you mean now. My idea was the opposite, but I see this could be much better. So I will refactor my code and provide new patch.


--- Quote from: oBFusCATed on March 23, 2011, 01:38:53 pm ---What info do you need in GDBDebugger or GDBWatch that is not accessible through the SDK interfaces cbDebuggerPlugin and cbWatch?
--- End quote ---
I think only methods in GDBWatch:
* IsArray
* GetArrayStart
* GetArrayCount
* GetIndex added by me I know that in other languages (Python, ...) there are no arrays, but this methods could be more abstract like IsContainer, ... and added to cbWatch. What do you think about this idea?

oBFusCATed:
Why do you care if the object is a container?
The cbWatch is a node in a tree, in fact, so if there are children the object is container somehow...

For example: if you have a watch object for an array: the elements of the array would be added as children cbWatch objects to the array cbWatch object.

Your drawing/visualizing code should only traverse the tree (asking every node in the three for its properties), see how it is done in the Watches window.
The drawing/visualizing should not care what the type of the watch is.
Probably we could add some hints, but I think it is doable without them.

p.s. IsContainer is hardly implementable in the DebuggerPlugin, because the Watch properties dialog is implemented in the plugin, not in the SDK.

m.29:
I cared about that because I wanted to use another visualization for arrays (see image). But I write my own method to determine if watch is array. I check if children's symbol contains [ character :-|

I re-factored my code and moved sources to SDK. I think there is only model in the plugin. I'm posting my patch here in next few days. Hope you'll find time to check it and will give me the feedback on it. And thanks for the previous feedback :)

[attachment deleted by admin]

oBFusCATed:
Great, I'm waiting for the patch :)
Hope it runs on linux  :lol:

m.29:
So I did the most of my TODOs and tried the patch on Ubuntu. On Ubuntu I found modifications like this one in patch:

--- Code: ---@@ -232,7 +232,7 @@
  </Linker>
  </Target>
  <Target title="Compiler depslib">
- <Option output="plugins/compilergcc/depslib/depslib" prefix_auto="1" extension_auto="1" />
+ <Option output="plugins/compilergcc/depslib/libdepslib" prefix_auto="1" extension_auto="1" />
  <Option working_dir="" />
  <Option type="2" />
  <Option compiler="gcc" />
--- End code ---
I don't know what is it and why is there. Because of this there are not included modifications in "CodeBlocks-unix.cbp" file so on linux you need to add 10 files to project.

src/include/arraypanel.h
src/include/viewnode.h
src/include/viewvector.h
src/include/visualwatchesdlg.h
src/include/visualobject.h

src/sdk/arraypanel.cpp
src/sdk/viewnode.cpp
src/sdk/viewvector.cpp
src/sdk/visualwatchesdlg.cpp
src/sdk/visualobject.cpp

Hope it is not complication for you. I'm waiting for your feedback :-)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version