Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » XWT External property -style
XWT External property -style [message #527503] Thu, 15 April 2010 13:28 Go to next message
Alper Turkyilmaz is currently offline Alper TurkyilmazFriend
Messages: 4
Registered: April 2010
Junior Member
Hi ,
I want to set the adapterInfo property of a custom widget as follows:

<biml_page v="" pid="JSFIPage1271318884843" t="G" size="800,600"
xmlns="http://www.eclipse.org/xwt/presentation" xmlns:c="clr-namespace:com.fiba.jsfi.ui.swt.custom"
xmlns:tc="clr-namespace:com.fiba.jsfi.ui.swt.table.custom" xmlns:x="http://www.eclipse.org/xwt">
<tc:UITable bounds="29,335,747,235">
<UITable.adapterInfo>Blahblah</UITable.adapterInfo>
</tc:UITable>
.......

But it does not work ..
............
<tc:UITable bounds="29,335,747,235">
<UITable.adapterInfo>
<j:String>Blahblah</j:String>
</UITable.adapterInfo>
</tc:UITable>
........
Furthermore, the above XML block does not work..


<tc:UITable bounds="29,335,747,235" adapterInfo="Blahblah">
</tc:UITable>

this type of decleration is OK.


where do I make mistake? Any idea? How can I set externally a widget property/style?

[Updated on: Thu, 15 April 2010 13:45]

Report message to a moderator

Re: XWT External property -style [message #527649 is a reply to message #527503] Thu, 15 April 2010 22:46 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
I think you should use the j namespace for UITable.adapterInfo:
<j:UITable.adapterInfo>

if adapterInfo is a String, the code could be:

<tc:UITable bounds="29,335,747,235" adapterInfo="Blahblah" />

Regards
yves
<alper_turkyilmaz@yahoo.com> wrote in message
news:hq749b$qol$1@build.eclipse.org...
> Hi ,
> I want to set the adapterInfo property of a custom widget like this:
>
>
> <tc:UITable bounds="29,335,747,235">
> <UITable.adapterInfo>Blahblah</UITable.adapterInfo>
> </tc:UITable>
>
> But it does not work ?
> <tc:UITable bounds="29,335,747,235">
> <UITable.adapterInfo>
> <j:String>Blahblah</j:String>
> </UITable.adapterInfo>
> </tc:UITable>
>
>
>
> what is Wrong with it? Any idea?
>
>
Re: XWT External property -style [message #527702 is a reply to message #527649] Fri, 16 April 2010 07:25 Go to previous messageGo to next message
Alper Turkyilmaz is currently offline Alper TurkyilmazFriend
Messages: 4
Registered: April 2010
Junior Member
Hi Yves thanks for the reply,
Unfortunately, your suggestion failed either,



<tc:UITable bounds="29,335,747,235">
<UITable.adapterInfo>Blahblah</UITable.adapterInfo>
</tc:UITable>

where "Blahblah" is a string value;

I think we should use both inline or external style value assignment , at least to increase readability, For the above xml definition, the external style value assignment fails for the following reason,


In org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu ilder.createAttribute(....) method; although the value (content of the xml) is set during createChild method execution, it is reassigned to null value in the next lines of createAttribute method... in other words,

for the code block in org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu ilder.createAttribute(....) method;

if (attr instanceof IDOMElement) {
IDOMElement child = (IDOMElement) attr;
createChild(nameAttr, child, null);
}

the value "Blahblah" is set to the nameAttr object in createChild method , however , the value of the nameAttr is reset to null, because local variable "value" is not changed.

if (attr instanceof IDOMElement) {
IDOMElement child = (IDOMElement) attr;
createChild(nameAttr, child, null);
value = nameAttr.getValue();
}

As a workaroud solution, if we add the above line to the code, then it works,is this a bug, or am I missing something?

by the way,
I am using 0.9.1.v2010211-0930 version of org.eclipse.e4.xwt.tools.ui.designer plugin

regards,
Alper.


[Updated on: Fri, 16 April 2010 13:25]

Report message to a moderator

Re: XWT External property -style [message #527801 is a reply to message #527702] Fri, 16 April 2010 14:28 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
Plese note that there are two parsers: one in XWT runtime and another in XWT
Visual Designer. They are not name.

You should test it runtime first. If it doesn't work, please fill a bug in
eclipse bugzilla.

Best regards
Yves YANG
"Alper Turkyilmaz" <alper_turkyilmaz@yahoo.com> wrote in message
news:hq93cr$bi0$1@build.eclipse.org...
> Hi Yves thanks for the reply,
> Unfortunately, your suggestion failed either,
>
> <tc:UITable bounds="29,335,747,235">
> <UITable.adapterInfo>Blahblah</UITable.adapterInfo>
> </tc:UITable>
>
>
>
> I think we should use both inline or external style value assignment , at
> least to increase readability, For the above xml definition, the external
> style value assignment fails for the following reason,
>
>
> In org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu
> ilder.createAttribute(....) method; although the value (content of the
> xml) is set during createChild method execution, it is reassigned to null
> value in the next lines of createAttribute method... in other words,
>
> for the code block in
> org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu
> ilder.createAttribute(....) method;
> if (attr instanceof IDOMElement) {
> IDOMElement child = (IDOMElement) attr;
> createChild(nameAttr, child, null);
> }
>
> the value "Blahblah" is set to the nameAttr , however , the value of the
> nameAttr is reset to null, because local variable "value" is not changed.
>
> if (attr instanceof IDOMElement) {
> IDOMElement child = (IDOMElement) attr;
> createChild(nameAttr, child, null);
> value = nameAttr.getValue();
> }
> if we add the following line to the code, then it works,is this a bug, or
> am I missing something?
>
> regards,
> Alper.
>
>
>
Re: XWT External property -style [message #574351 is a reply to message #527649] Fri, 16 April 2010 07:25 Go to previous message
Alper Turkyilmaz is currently offline Alper TurkyilmazFriend
Messages: 4
Registered: April 2010
Junior Member
Hi Yves thanks for the reply,
Unfortunately, your suggestion failed either,

<tc:UITable bounds="29,335,747,235">
<UITable.adapterInfo>Blahblah</UITable.adapterInfo>
</tc:UITable>



I think we should use both inline or external style value assignment , at least to increase readability, For the above xml definition, the external style value assignment fails for the following reason,


In org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu ilder.createAttribute(....) method; although the value (content of the xml) is set during createChild method execution, it is reassigned to null value in the next lines of createAttribute method... in other words,

for the code block in org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu ilder.createAttribute(....) method;

if (attr instanceof IDOMElement) {
IDOMElement child = (IDOMElement) attr;
createChild(nameAttr, child, null);
}

the value "Blahblah" is set to the nameAttr , however , the value of the nameAttr is reset to null, because local variable "value" is not changed.

if (attr instanceof IDOMElement) {
IDOMElement child = (IDOMElement) attr;
createChild(nameAttr, child, null);
value = nameAttr.getValue();
}

if we add the following line to the code, then it works,is this a bug, or am I missing something?

regards,
Alper.
Re: XWT External property -style [message #574427 is a reply to message #574351] Fri, 16 April 2010 14:28 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
Plese note that there are two parsers: one in XWT runtime and another in XWT
Visual Designer. They are not name.

You should test it runtime first. If it doesn't work, please fill a bug in
eclipse bugzilla.

Best regards
Yves YANG
"Alper Turkyilmaz" <alper_turkyilmaz@yahoo.com> wrote in message
news:hq93cr$bi0$1@build.eclipse.org...
> Hi Yves thanks for the reply,
> Unfortunately, your suggestion failed either,
>
> <tc:UITable bounds="29,335,747,235">
> <UITable.adapterInfo>Blahblah</UITable.adapterInfo>
> </tc:UITable>
>
>
>
> I think we should use both inline or external style value assignment , at
> least to increase readability, For the above xml definition, the external
> style value assignment fails for the following reason,
>
>
> In org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu
> ilder.createAttribute(....) method; although the value (content of the
> xml) is set during createChild method execution, it is reassigned to null
> value in the next lines of createAttribute method... in other words,
>
> for the code block in
> org.eclipse.e4.xwt.tools.ui.designer.editor.model.XWTModelBu
> ilder.createAttribute(....) method;
> if (attr instanceof IDOMElement) {
> IDOMElement child = (IDOMElement) attr;
> createChild(nameAttr, child, null);
> }
>
> the value "Blahblah" is set to the nameAttr , however , the value of the
> nameAttr is reset to null, because local variable "value" is not changed.
>
> if (attr instanceof IDOMElement) {
> IDOMElement child = (IDOMElement) attr;
> createChild(nameAttr, child, null);
> value = nameAttr.getValue();
> }
> if we add the following line to the code, then it works,is this a bug, or
> am I missing something?
>
> regards,
> Alper.
>
>
>
Previous Topic:XWT. Using TableViewer.columns. Why?
Next Topic:XWT + RCP
Goto Forum:
  


Current Time: Fri Mar 29 12:24:35 GMT 2024

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

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

Back to the top