Page 1 of 1

Possibility to find out if an XML is shwon in a single line or not?

Posted: Tue Feb 26, 2013 12:37 pm
by SSC
Hello,

is it somehow possible to find out if a certain AuthorElement is shown in a single line or not?
The reason for this is that I´d like to like to style those AuthorElements in a single line differently than those who go over several lines.

Particularly I mean the display style of the border to distinguish between "inline" and "inline-block".
Unfortunately with "inline-block" style in version 14.2 the border is still also drawn around those xml tags, which do not belong to the xml tag, which actually should have the border.
And the "inline" style does not look good over more than one line. :?

Best regards,

Simon

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Tue Feb 26, 2013 1:00 pm
by Radu
Hi Simon,

We do not have API to identify whether an element's content will span one or multiple lines.
Also Oxygen does not (yet) have support for the CSS display:inline-block so it ignores it in the CSS, probably in your case it considers the element to be inline.
So I do not have a workaround for you.

Regards,
Radu

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Tue Feb 26, 2013 2:32 pm
by SSC
Hello Radu,

Okay then we´ll have to go back to the "block" display border, which unfortunately also draws a border around those XML tags, which shouldn´t have one :

Image

I thought "inline" display would be the solution, but that does not really look good and gets worse the more lines a node has:

Image

It would have been nice to have something like this without turning off the compact tag layout:

Image

Best regards,

Simon

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Tue Feb 26, 2013 4:23 pm
by Radu
Hi Simon,

So right now the problem with image (1) is that because of the compact tags layout (which is a default setting) inside the border of "solution" there are also compacted end tags for the parent elements of "solution".
We'll try to work on this one, if an element specifies a border around it somehow disable the compacting of parent start and end parent element tags inside it.

Regards,
Radu

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Wed Feb 27, 2013 12:31 pm
by SSC
Hi Radu,
We'll try to work on this one, if an element specifies a border around it somehow disable the compacting of parent start and end parent element tags inside it.
Thanks that would be great :)

The actually desired way of styling is this:

Image

In the other one of the previous post the solution tag is placed inline, but this here is better :wink:

Best regards,

Simon

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Wed Feb 27, 2013 12:39 pm
by Radu
Hi Simon,

Yes, the solution we are working on should render the desired layout.
Do you want a beta kit when this is available in order to test on your side?

Regards,
Radu

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Wed Feb 27, 2013 12:48 pm
by SSC
Hi Radu,

I didn´t expected such a quick answer and that you directly implement a solution for this issue.
Thanks for such a great support again :)

Of couse I would appreciate to have a beta kit in order to test it for you.

Best regards,

Simon

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Thu Feb 28, 2013 12:44 pm
by SSC
Hello Radu,

Thanks for offering me the beta kit for this issue.

I just testet it and it seems to be fine :) , but when I add a border dynamically(by using a ro.sync.ecss.extensions.api.StylesFilter) at runtime the wrong styling occurs again unless I do a refresh() on the whole document.

Would it maybe possible to rearrange the XML tags, when a border is added by a StylesFilter?

I mean to refresh the editor after adding the Border programmatically works, but I think this must not be necessary, because the border itself is also directly drawn without a refresh.
I am only asking for this, because I do not want to waste performance by refreshing the whole document every time a border is added, in case you could do rearrange in a more performant way. :wink:

Best regards,

Simon

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Thu Feb 28, 2013 12:58 pm
by SSC
Hello again,

I just figured out that this also works and of cause performs better:

Code: Select all


AuthorNode authorNodeWithBorder = ...
ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPage.refresh(authorNodeWithBorder.getParent());
So well done :wink:

Or can you do it even more performant than using WSAuthorEditorPage.refresh(authorNodeWithBorder.getParent());?

Best regards,

Simon

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Thu Feb 28, 2013 1:30 pm
by Radu
Hi Simon,

Actually we added the refresh API for just such cases.

The Author mode has a layout stage in which the layout of the content is computed (where each component is placed) and a rendering stage which gets called quite often when the components are painted on screen.
Usually when the document is not modified the StylesFilter is called from the painting stage and even if you set the border, the layout was already computed so you need to somehow force the layout on a certain node.

Indeed a possible problem could be a decrease in performance as the StylesFilter gets called quite a lot.
You should try to use JProfiler to profile the CPU when using the Eclipse application when working with a larger XML document, see if the styles filter accounts for a lot of processing. We use JProfiler internally quite a lot.

Regards,
Radu

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Thu Feb 28, 2013 1:54 pm
by SSC
Hi Radu,

ok thanks for the hint.
We do also use Profilers in some cases.

As I received a beta kit of version 15 I guess this feature cannot be merged into the 14.2 release, right?
I would really appreciate to have this feature now, because I guess the realse of version 15 will be in autumn this year, right?

Best regards,

Simon

Re: Possibility to find out if an XML is shwon in a single line or not?

Posted: Thu Feb 28, 2013 3:16 pm
by Radu
Hi Simon,

I would be reticent integrating the changes in the minor bug fix versions of 14.2.
But version 15.0 will probably be released at the end of May, or beginning of June 2013, so not that late.

Regards,
Radu

Re: Possibility to find out if an XML is shwon in a single l

Posted: Tue Jun 11, 2013 3:40 pm
by Radu
Hi Simon,

We released Oxygen 15.0 a couple of days ago, maybe you can check it out when you have the time.

Regards,
Radu