From: Liam M. <lm...@wp...> - 2004-12-22 08:23:56
|
My original idea for what to display when the user selects "inspect" was the Properties view that comes with Eclipse. There are a few problems with this (ask me if you're curious), so I switched to a TableTreeViewer. A table tree viewer is basically a table with a tree in the far left column. Unfortunately it doesn't allow user-specified images in the tree column. I was really hoping to display a field's public/private/static/final properties with an image, the same image that gets displayed in the Package Explorer or the Outline (I'm already displaying this for methods in the right-click). I tried putting the images in the right column (which isn't great in any case), but they are limited to what seems to be 16x16 pixels, which is too small. I have an idea which I think is better than the above two, but seeing as how this would be my third rewrite, I just wanted to check with the rest of you to get your input. The Visual Editor Project uses a TreeViewer (the view is called "Java Beans"). You can right-click on an individual variable and select "set text", and it will rename the item right in the tree. This is something we can do for modifying public fields. (You can also select "rename" to get a popup, but I prefer doing it right in the tree). It allows images, and the "search" view uses the same 27x16 images that I would use in its tree, so I'm guessing I wouldn't have any problem with image size. This way, we can expand objects that are within other objects in a UI that's fairly consistent with Eclipse, as opposed to a pop-up "Inspect" dialog which would open yet another "Inspect" dialog. Here's an example of the kind of table I was thinking of (where 'o' is where the images would be): + objName: ObjClassType |-- o int primitiveField = 6 |-- o Boolean wrapperField = true |-+ o MyInterface userClassField = MyClass | |-- o String stringField = "my string" | |-- o String nullField = null | |-+ o int[] arrayField = int[2] | | |-- int[0] = 0 | | |-- int[1] = 1 | + o List listField = ArrayList The above is pretty much what you'd see in the debug view, except that a non-primitive Boolean object would have a node with its primitive value underneath it unlike above. I think we should also stick something in the properties view, but I have no idea what to put there. Maybe variable name, object type, associated project, and the constructor it was instantiated with (but I'm not sure why someone would want to know that). Does this sound alright? Liam |