|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Adding another Source tab [message #976496 is a reply to message #976472] |
Thu, 08 November 2012 11:20   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
I not quite understand you, but will try to give you some information.
Do you want to replace Info class for Object?
I don't see how this can be useful.
org.eclipse.wb.internal.core.xml.model.description.ComponentDescriptionHelper loads component descriptions.
org.eclipse.wb.internal.core.model.description.helpers.DescriptionHelper.addDescriptionResources(LinkedList<ClassResourceInfo>, ILoadingContext, Class<?>) is used to find *.wbp-component.xml files to process. It looks for me that *.wbp-component.xml file from plugin with same toolkit id will be loaded first. And if there are several of them (never planned for this), then one of them will be loaded, we cannot know which one.
Konstantin Scheglov,
Google, Inc.
|
|
|
|
| Re: Adding another Source tab [message #976528 is a reply to message #976515] |
Thu, 08 November 2012 11:51   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
You link Info class to toolkit class using element "model" for Java or "x-model" to XML in *.wbp-component.xml
So, if you want to support some new component just create new *.wbp-component.xml file.
You cannot have two Info classes for same component in same toolkit.
SashFormInfo in XWT extends XmlObjectInfo, you cannot change this inheritance declaratively (using *.wbp-component.xml file).
Konstantin Scheglov,
Google, Inc.
|
|
|
|
| Re: Adding another Source tab [message #976575 is a reply to message #976539] |
Thu, 08 November 2012 12:37   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Yes, if you have your own language, not based on Java (obviously) and XML, you need to clone most org.eclipse.wb.core.xml for editor with pages and something like JavaInfo or XmlObjectInfo, but for your language. You you will decide to follow XML editor, you will also copy and tweak org.eclipse.wb.internal.core.xml.editor.palette.PaletteManager, which in case of XML reads palette from plugin.xml palette extensions. But you don't have to do it exactly same way - it is done in WB only because we have many extension plugins to support additional libraries, such as Ext GWT, new layouts for Swing, etc. Same for reading palette commands from projects - if you don't need it, don't copy it from XML.
From WB core you can use as little as org.eclipse.wb.internal.core.editor.DesignComposite for property, palette viewer and GEF.
Actually I'm going to create new Designer for new language too, and will refactor WB core in the next days to extract Java from WB Core into WB Core Java.
Konstantin Scheglov,
Google, Inc.
|
|
|
|
|
| Re: Adding another Source tab [message #981673 is a reply to message #981523] |
Mon, 12 November 2012 10:55   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Yes, some PropertyEditor implementations work with just Property and its setValue() method.
And some editors want GenericProperty and use setExpression().
So, you can use first editors, but not second ones.
Konstantin Scheglov,
Google, Inc.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04285 seconds