I create a ScrollingGraphicalViewer to show my figures, but no figure displays. I debugged the source and it seems all object (figures, editparts, models) are created, no exceptions. Why the figures do not display?
Since the code is larege and spread many Java files, I briefly depict what I did.
creating model objects. In my model, there are two kinds of elements, directory and file. A directory may contain other directories or files.
figure objects. I create two kinds of figures, one for directory, the other for file. the directory figure can have nested figures for nested directories and files.
editpart objects. for each kind of model elements, i.e., directory and file, to connect relation between model and figures.
an editpart factory object, for create each editpart object.
create a ScrollingGraphicalViewer object (viewer). and invoke the following methods on viewer: viewer.createControl(), viewer.setRootEditPart(), viewer.setEditPartFactory, and viewer.setContents().
Anything missing? Any clues and comments will be appriciated.
Thanks.