[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: how to add TabbedPropertySheetPage like wtp in my GEF project ?
|
it needs to define in plugin.xml and write yourself's section,and sectionfilter, and your ediotr must implements ITabbedPropertySheetPageContributor interface. Generally your section extends AbstractPropertySection class;
following is my code:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="org.beamframework.codegen.ui.gef.editor.ModelEditor"
icon="index.gif"
default="true"
contributorClass="org.beamframework.codegen.ui.gef.action.DiagramActionBarContributor"
name="ModelEditor"
id="org.beamframework.codegen.ui.gef.editor.ModelEditor"
extensions="bml"/>
</extension>
<extension
point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
<propertyContributor
typeMapper="org.beamframework.codegen.ui.gef.editor.ElementTypeMapper"
contributorId="org.beamframework.codegen.ui.gef.editor.ModelEditor"
labelProvider="org.beamframework.codegen.ui.gef.editor.PropertySheetLabelProvider">
<propertyCategory
category="element">
</propertyCategory>
<propertyCategory
category="other">
</propertyCategory>
</propertyContributor>
</extension>
<extension
point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
<propertyTabs
contributorId="org.beamframework.codegen.ui.gef.editor.ModelEditor">
<propertyTab
label="Advanced"
category="other"
afterTab="logic.tab.GefMetaModel"
id="logic.tab.Advanced">
</propertyTab>
<propertyTab
label="Diagram"
category="other"
id="logic.tab.Diagram">
</propertyTab>
<propertyTab
label="GefMetaModel"
category="other"
afterTab="logic.tab.Diagram"
id="logic.tab.GefMetaModel">
</propertyTab>
<propertyTab
label="Property"
category="other"
afterTab="logic.tab.Diagram"
id="logic.tab.GefProperty">
</propertyTab>
<propertyTab
label="Relation"
category="other"
afterTab="logic.tab.Diagram"
id="logic.tab.GefConnection">
</propertyTab>
</propertyTabs>
</extension>
<extension
point="org.eclipse.ui.views.properties.tabbed.propertySections">
<propertySections
contributorId="org.beamframework.codegen.ui.gef.editor.ModelEditor">
<propertySection
tab="logic.tab.Diagram"
filter="org.beamframework.codegen.ui.gef.editor.section.DiagramSectionFilter"
class="org.beamframework.codegen.ui.gef.editor.section.DiagramSection"
id="logic.section.Diagram">
<input
type="org.beamframework.codegen.ui.gef.model.Diagram">
</input>
</propertySection>
<propertySection
tab="logic.tab.GefMetaModel"
filter="org.beamframework.codegen.ui.gef.editor.section.MetaModelSectionFilter"
class="org.beamframework.codegen.ui.gef.editor.section.GefModelSection"
id="logic.section.GefMetaModel">
<input
type="org.beamframework.codegen.ui.gef.model.GefMetaModel">
</input>
</propertySection>
<propertySection
tab="logic.tab.GefProperty"
filter="org.beamframework.codegen.ui.gef.editor.section.GefPropertySectionFilter"
class="org.beamframework.codegen.ui.gef.editor.section.GefPropertySection"
id="logic.section.GefProperty">
<input
type="org.beamframework.codegen.ui.gef.model.Property">
</input>
</propertySection>
<propertySection
tab="logic.tab.GefConnection"
filter="org.beamframework.codegen.ui.gef.editor.section.GefConnectionSectionFilter"
class="org.beamframework.codegen.ui.gef.editor.section.GefConnectionSection"
id="logic.section.GefConnection">
<input
type="org.beamframework.codegen.ui.gef.model.Connection">
</input>
</propertySection>
<propertySection
tab="logic.tab.Advanced"
class="org.eclipse.ui.views.properties.tabbed.AdvancedPropertySection"
id="logic.section.Advanced">
<input
type="org.beamframework.codegen.ui.gef.model.Element">
</input>
</propertySection>
</propertySections>
</extension>
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application="org.eclipse.ant.core.antRunner"
name="bsfl"/>
</extension>
</plugin>