IÂve seen quite a few threads on dynamically contributing things to a
GMF editor (especially to the palette). Since the threadstarters were
struggling with different things (I think so at least), I wasnÂt able to
get the "big picture" concerning this issue. So problem is the following:
IÂve got an editor I build with GMF which runs inside a RCP. The editor
is used to model xml files, but with a lot of abstraction so itÂs easy
to use. IÂve also got an element in the semantic model which is called
Operator. It has got an "class" attribute which specifies the type of
Operator (e.g. an Adder). The possible specializations of the Operator
construct are held by a file outside the editor. The idea is to specify
the types of Operators (and other Elements, which are handled the same
way) by adding them to the outside file, which also contains their
attributes. At the editors start the Operator types shall be read from
the file and be added to the Operators tooling group (which is already
given) on the palette. The element that is created by selecting one of
these is simple an instance of the Operator class with itÂs own value
for the "class" attribute (which should also not be changeable after
creation). The pallete entries should have their individual icons, as
well as the nodes that are created from them.
So the idea is that the user can contribute new Operator-types by adding
them to the outside file and palette entries with individual icons
(which are also used for the created nodes so that the user can identify
the node without seeing the hidden "class" property).
Is this behaviour possible? If it is, are there some tutorials for it
that IÂve possibly missed? I read something about using some extension
points for this, but IÂm not that familiar with this yet. Some guidance
would be really awesome.