Syntax: What means All, Default, Default source, Text etc

Started by Stefan, January 06, 2009, 08:14:38 PM

Previous topic - Next topic

Stefan

QuoteVersion 576:

   * New feature. All syntaxes node in Options.
Some of the settings in syntax specification are not completely inheritable (for example display settings or word wrap).
Before it was not possible to change such preferences in one step for all syntaxes,
it was necessary to do this one by one for every syntax. Now, with All syntaxes it is possible.

I thought this settings would be set with "default" syntax?
Why we need "All Syntaxes" too?

Now we have
"All Syntaxes"
"Default"
"Default Source"
"Default Text"

Some setting i should do in "All Syntaxes" (for example display settings or word wrap)
Other default i should do in "Default" (like Code Templates, as far as i understand)


Would you please explain the coherencies if you get some time to do this?

Just an confused
Stefan ;D
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

Default, Default Source, Default Text schemas
As you know syntax schemas in HE can be inherited. And they are :). So schema from which everything starts is Default. Then comes two schemas as Default Source and Default Text which are the base for two families of syntaxes. One for source code (c++, php, css etc) and another for text based (Plain text, xml, html etc) documents. The rest of syntaxes inherit one of them, depending of what is more suitable. This is done in such way to not copy same styles and properties from schema to schema and make everything ... a little bit "structured"..

Find Results 1/2 Window, Output Window and Tooltip Window schemas
Not all schemas inherited form default. There are some "technical" schemas which are not really syntaxes but used to configure parts of the editor as Find Results 1/2 Window, Output Window and Tooltip Window. They are not really same like editor window now, but would be in the future.

So, schemas are inheritable. That is why you see in the Fonts and Colors and Code Templates pages something like "show inhertable..." and "inherited from ..." and "(Default)". This is everything indicating what can be inherted and from which syntax. Also from now you can see/nathigate through all inheritance hierarchy directly in these pages - see breadcrumb on top of the page. In particular inherited are: Styles, Scopes, Labels, Fonts, Format Words, Specification (everything that is not editable by user) and something more.

All Syntaxes page
But not everything is inhertable. Mostly because of the technical reason, but from usability point also. These are Display settings and Word Wrap settings. It is very difficult to track from which schema particular flag was inherited, but this is necessary, because on saving you need to set this specially to this parent syntax. Because all other syntaxes inherted from that one parent should also get this option set on reload. Also you could not use default values for attributes any more (to skip them on saving). Because now they mean something from parent language. This is from technical point of view.
From usability point of view, how to show to the user, that on Display page fex, one check box property belongs (inherited) from one syntax, and another from other syntax in hierarchy? And this is can be. So I have decided to do some properties not inheritable. They are not completelly not inhertable, if property is not existing in definition it taken from base schema. But as far you saved this schema. This defaults are copied to user preferences for this particular schema (not to that schema where it was defined, if they are). So at the end you would get some non-inhertable properties that would not be possible to change all in once. Specially for this purposes special node "All syntaxes" was designed. It does not correspond to any phisical xml schema but could change/overview all non-inhertable propeties for all syntaxes in one step. This is also not completelly true, touched only "finite" syntaxes (which can be applied to file). Abstract schemas (from which you can only inherit) are skiped. For example Default, Default Source, Default Text etc. The properties of the schema can be found in Miscellaneous page.

Wow. A lot :) I would move this topic to FAQ because probably not only you would like to know :))
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan


Quote from: alex on January 07, 2009, 03:40:17 PM
[...] Specially for this purposes special node "All syntaxes" was designed.
It does not correspond to any phisical xml schema but could change/overview all non-inhertable propeties for all syntaxes in one step.
AND
Quote from: alex on July 03, 2009, 11:12:15 AM
Hello zash,

Line numbers and word wrap are document and syntax dependent.
In your case you have changed document specific properties.

To enable this for all documents of specific syntax go to Tools->Options->Syntax Settings->%Syntax you want to change% - Editor, Line Numbers or Word Wrap page under syntax.

To change these settings for all syntaxes, select node All Syntaxes under Syntax Settings.

Best regards,
Alex.

Hi Alex,
so as far as i understand the "secret" behind  "All Syntaxes" is that
settings made in "All Syntaxes" are remembered user related
and settings made in "Default" do modify the xxx_def.xml -files itself?

And second, there is an better visible overview for
an user in "All Syntaxes" -page what option is set or not.

So my new picture below does not provide your recommendation?
Do you say we should prefer "All Syntaxes" to modify settings for ALL syntaxes instead of "Default"?
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Heh... As said our friend Samuel "my bad" :)

Everything is a little bit mixed and lead to misunderstanding I think...

So base for two approaches of settings (Default->Default Source etc and All Syntaxes) is that not all properties are inheritable...

Styles (Font and Colors), Code Templates are always inheritable form parent syntax, and if you add something to syntax it would belong to it and all syntaxes inherited from it. Settings are merged from spec file and user file (user file overwrite spec file). And these is possible to maintain because of the data nature (merging of list and display in braces original parent syntax).

But for Word Wrap and Editor settings that represented by check boxes, it is rather difficult to show that it is inherited from something and also not possible to say use from me but not inherit. Or maybe possible (do not know how yet, but too complex in maintenance). So these options are inheritable initially but once changed (let say in time when user file for syntax is created or something stored in it) it copied to syntax specific settings which do not inherit any more.
That is why I have introduced All Syntaxes to change all these copied options at once. All check boxes in All Syntaxes node are three state. So when it is not set, none of syntaxes has flag set, when on -> all have flag, and if third state, some have flag some not.
For combos, if is empty, then not all have same option.
So that was a try to see what is better, and maybe we can find a better way...

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]