Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » how to add TabbedPropertySheetPage like wtp in my GEF project ?
how to add TabbedPropertySheetPage like wtp in my GEF project ? [message #210923] Tue, 07 March 2006 09:12 Go to next message
Eclipse UserFriend
Originally posted by: tmxk2008.gmail.com

how to add TabbedPropertySheetPage like wtp in my GEF project?
someone has done with it ??

thx

welcome any replies!
Re: how to add TabbedPropertySheetPage like wtp in my GEF project ? [message #210934 is a reply to message #210923] Tue, 07 March 2006 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ingo.koch[nospam].sap.com

I have done it and it is not that hard.

Here are the steps:

1. make the plug-in available for your project.


2. add this to YourEditor#getAdapter()

// if (type ==
org.eclipse.ui.views.properties.IPropertySheetPage.class) {
// TabbedPropertySheetPage page = new TabbedPropertySheetPage(new
ITabbedPropertySheetPageContributor()
// {
//
// public String getContributorId()
// {
//
// return "contributorId";
// }
//
// });
//
// return page;
// }

(without the comments :-) )

3. read
http://www.eclipse.org/articles/Article-Tabbed-Properties/ta bbed_properties_view.html
for the details.

Regards, Ingo




"heima2008" <tmxk2008@gmail.com> wrote in message
news:191947.1141722803764.JavaMail.root@cp1.javalobby.org...
> how to add TabbedPropertySheetPage like wtp in my GEF project?
> someone has done with it ??
>
> thx
>
> welcome any replies!
Re: how to add TabbedPropertySheetPage like wtp in my GEF project ? [message #211035 is a reply to message #210923] Wed, 08 March 2006 00:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tmxk2008.gmail.com

thanks for your support.
I use eclipse3.1.1 to develop my gef project.
and it does not contain TabbedPropertySheetPage.class .
any plugin i needed? or I must use eclipse3.2M5 to develop?
Re: how to add TabbedPropertySheetPage like wtp in my GEF project ? [message #213979 is a reply to message #210923] Wed, 12 April 2006 07:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cadu.codetic.com

heima2008 a écrit :
> how to add TabbedPropertySheetPage like wtp in my GEF project?
> someone has done with it ??
>
> thx
>
> welcome any replies!
hello heima2008,

i've the same problem than you, i want to use property tabs to edit a
GEF model

did you acheive in doing it ?

i've like to get an example showing how does it work

mygsm
Re: how to add TabbedPropertySheetPage like wtp in my GEF project ? [message #214022 is a reply to message #213979] Wed, 12 April 2006 14:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tmxk2008.gmail.com

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.DiagramActionBarCont ributor "
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.PropertySheetLabelPr ovider ">
<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.DiagramSecti onFilter "
class=" org.beamframework.codegen.ui.gef.editor.section.DiagramSecti on "
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.MetaModelSec tionFilter "
class=" org.beamframework.codegen.ui.gef.editor.section.GefModelSect ion "
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.GefPropertyS ectionFilter "
class=" org.beamframework.codegen.ui.gef.editor.section.GefPropertyS ection "
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.GefConnectio nSectionFilter "
class=" org.beamframework.codegen.ui.gef.editor.section.GefConnectio nSection "
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.AdvancedPropertySecti on "
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>
Re: how to add TabbedPropertySheetPage like wtp in my GEF project ? [message #217216 is a reply to message #214022] Thu, 01 June 2006 13:34 Go to previous messageGo to next message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
I think there an easy way of doing that is via the method: PropertyDescriptor.setCategory()

if you set the same category for two or more properties, they will be available under the same tab.


On Wed, 12 Apr 2006 10:00:38 EDT
heima2008 <tmxk2008@gmail.com> wrote:

> 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.DiagramActionBarCont ributor "
> 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.PropertySheetLabelPr ovider ">
> <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.DiagramSecti onFilter "
> class=" org.beamframework.codegen.ui.gef.editor.section.DiagramSecti on "
> 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.MetaModelSec tionFilter "
> class=" org.beamframework.codegen.ui.gef.editor.section.GefModelSect ion "
> 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.GefPropertyS ectionFilter "
> class=" org.beamframework.codegen.ui.gef.editor.section.GefPropertyS ection "
> 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.GefConnectio nSectionFilter "
> class=" org.beamframework.codegen.ui.gef.editor.section.GefConnectio nSection "
> 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.AdvancedPropertySecti on "
> 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>
Re: how to add TabbedPropertySheetPage like wtp in my GEF project ? [message #217237 is a reply to message #217216] Fri, 02 June 2006 02:47 Go to previous message
Eclipse UserFriend
Originally posted by: tmxk2008.gmail.com

yes ,you are right .
there are two ways to add tab to property sheet.
one is making propertysheet extends ITabbedPropertySheetPageContributor ;
the other is using PropertyDescriptor.setCategory.
Previous Topic:text(-labels) musn't scale - possible?
Next Topic:how to club gef with eclipse?
Goto Forum:
  


Current Time: Thu Apr 18 13:26:43 GMT 2024

Powered by FUDForum. Page generated in 0.03065 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top