Java Reference
In-Depth Information
<extension
point="org.eclipse.ui.views.properties.tabbed.propertySections">
<propertySections contributorId="org.eclipse.mindmap.diagram">
<propertySection
id="property.section.domain"
tab="property.tab.domain"
class=
"org.eclipse.mindmap.diagram.sheet.MindmapPropertySection">
<input type="org.eclipse.gef.EditPart"/>
</propertySection>
</propertySections>
</extension>
We can easily configure additional provided property tabs and content con-
tribution. Take a look at generated diagram code to see the contribution of visual
property tabs and content for diagram appearance, rulers, grid, and so on.
10.8.3 Connections
We need to provide linking between
Topic
elements to establish subtopic rela-
tionships. We begin by extending our
paletteProviders
contribution to
include a link drawer and tool, as seen here:
<entry id="linkDrawer"
label="%palette.link.drawer.label"
kind="drawer"
description="%palette.link.drawer.desc"
path="/"
small_icon="icons/obj16/Link.gif">
<expand>
<content/>
</expand>
</entry>
<entry id="Subtopic"
label="%palette.link.label"
kind="tool"
description="%palette.link.desc"
path="/linkDrawer/"
small_icon="icons/obj16/Link.gif"/>
Next, we revisit our
MindmapPaletteFactory
to add the corresponding
tool for this palette entry. This time, we use the
ConnectionCreationTool
,
passing our soon-to-be-created
SUBTOPIC
element type.
public
Tool createTool(String toolId) {
if
(toolId.equals("Topic")) {
return
new CreationTool(MindmapElementTypes.TOPIC);
Search WWH ::
Custom Search