Add user spec in xxx_spec.xml

Started by JJK, January 20, 2009, 09:09:13 AM

Previous topic - Next topic

JJK

I don'nt know where to write this topic, FAQ, feature, bug ?
The issue I encounter concerns Basic syntax.
I want that "With...End With" generates indentation. But currently it is not the case.
So I added next line in basic_spec.xml:
<Scope open="With" close="End With"/>
But when I install a new release of HE, the file basic_spec.xml is overwritten.

My questions :
- How to modify such spec in xxx_spec.xml and keep them when re-installing HE ?
- If not possible, Alex, can you add the line above in basic_spec.xml ?
- If you think that it is not a good idea, do you plan a possibility for users to modify xxx_spec.xml and for example warn him that re-install will overwrite his spec.xml ?
It seems to me that basic_user.xml is not able to contain such spec as Scope...With...End With.
Perhaps it is sufficient for me to uncheck VB/VBA syntax into reinstalling process. But if new features were added in the VB/VBA syntax of the HE new release, I'll loose them, and I'll not know it.
Any idea ?
TIA


Stefan

#1
> - How to modify such spec in xxx_spec.xml and keep them when re-installing HE ?

I have this question always too.
I never install HE but un-pack them and copie the files over my HE-folder. (and have to take care not to copy the license.dat too)

I think an solution would be to allow the user to rename the XML-files to add an prefix
like:
batch_spec.xml ==> rename to batch_spec_2.xml  or to batch_spec_my.xml  or to batch_spec_Stefan3.xml
and then chose in Options... > Syntax > Miscellaneous the  current wanted specification files from an list box.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

JJK

Yes it seems to have sense.
A little similitude with keyboard settings, where we can save our own mapping schemes ?
If it is not too complicate...

Stefan

#3
Quote from: JJK on January 20, 2009, 10:50:07 AM
A little similitude with keyboard settings, where we can save our own mapping schemes ?
At least that is already there > Options... > Keyboard > [save as]
then you can chose from default and your own mapping scheme.

Unfortunately you can't just copy the keymap-file with explorer.... HE  recognizes only files saved on his own.
(an file i have copy&paste i didn't see in "mapping scheme"-list)


EDIT:
it's no matter what file name this keymap-file have... the recognizes name have to be inside the  keymap-file itself!
That way you can make an file copy with explorer, modify the scheme name inside the file, restart HE, and you can chose it.

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

JJK

#4
1) I copy keymap_JJK.xml and paste it as keymap_other.xml.
2) In my data\settings.xml I have
Quote<Keyboard>
      <KeySchema>JJK</KeySchema>
   </Keyboard>
3) I add <KeySchema>other</KeySchema> then save settings.xml
4) I modify the 3rd line of keymap_other.xml so : <HOTKEYSCHEMA name="other">

Finally I have the two mapping recognized by HE. Enjoy ! No need to build other mapping from nothing.
But when in Optionns::Keyboard window, you can "save as" any key mapping. Has it exactly the same result ? I don't know.

Stefan

Ah, you get it on your own :D

point 3.) is not necessary because there have to be the current chosen scheme only.
There is no list of schemes stored.... just the files in the keymaps folder with names inside,... which HE provides at request.

>Has it exactly the same result
Yes (but as addition an entry in the <InputHistory> :D)
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

JJK

1.41 b603
Thanks Alex to have added
<Scope open="With" close="End With"/>
in basic_spec.xml.

Any other in b603 ?

alex

Hello JJK,

my opinion about user changes in spec file (pertially, I think I hav wrote it already somewhere):
- if you see that schema miss something standard - default (installed) schema should be corrected. Send me details, and I would do changes in schema and you would get it with new version. I am not an expert in all syntaxes, so schemas can be not perfect :)
- if you want something special, which is not standard and maybe would not fit to all users - create you own schema based on existing one, and you extension there.
- when new/updated spec file copied with HE installer, old file would be renamed to xxx_spec.xml.old. So you changes are not lost.

In the 1.50 I am planning to introduce mechanism to update schemas from your local PC to server and vice versa. For example if you have a schema which is better (more complete) then existing one, you can submit it to server, it would be stored in Purgatory until would be checked and replace existing schema.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

#8
OK with your previous answer.
Waiting the mechanism to update schemas which would arive with 1.50, I have some questions about basic_spec.xml
Here is an extract of this file.

Quote00    <SCOPES>
01      <Scope open="Class" close="End Class" has_name="true" separator="true"/>
02      <Scope open="Sub" close="End Sub" has_name="true" separator="true"/>
03      <Scope open="Function" close="End Function" has_name="true" separator="true"/>
04      <Scope open="Begin" close="End" has_name="true" separator="true"/>
05      <Scope open="For" middle="To"  close="Next"/>
06      <Scope open="For Each" middle="In"  close="Next"/>
07      <Scope open="With" close="End With"/>     
08      <Scope open="While" middle="Exit While"  close="Wend">
09        <Close text="End While"/>
10      </Scope>
11      <Scope open="Select Case" middle="Case" close="End Select">
12        <Middle text="Case Else"/>
13      </Scope>
14      <Scope open="Do While" close="Loop"/>
15      <Scope open="Do" close="Loop Until">
16        <Close text="Loop"/>
17      </Scope>
18      <Scope open="If" middle="Else" close="End If" strict="false">
19        <Middle text="Then"/>
20        <Middle text="ElseIf"/>
21      </Scope>
22      <Scope open="Exit Sub" struct="false"/>
23      <Scope open="Exit While" struct="false"/>
24      <Scope open="Exit For" struct="false"/>
25      <Scope open="Exit Function" struct="false"/>
26      <Scope open="Exit Do" struct="false"/>
27      <Scope open="Continue While" struct="false"/>
28      <Scope open="Continue For" struct="false"/>
29      <Scope open="Continue Do" struct="false"/>
30      <Scope open="Declare Function" struct="false"/>
31    </SCOPES>

When edting this file, if I click on any of the lines 02 to 09 the scope (in the present file) goes from line 01 to line 10. I can see that because the words "Scope" of those 2 lines 01 and 10 are blue while in the others lines they are black. Other weirdness : lines 14 and 17 seem matching (as lines 01 and 10).
Yet it seems to me that line 10 must match line 08 and not 01. Also lines 17 must be linked with line 15 and not 14. Am I wrong ?

Other little issue : VBA allows Do While... Loop but allows also Do... Loop While (idem for Until). Currently my Do... Loop While texts are colored with error color (red). Can you add those features ?

TIA

alex

About bug in HippoEDIT config schema I know. Reason HE parsing engine till know is not able to recognize that < ... /> is open and closed, and scope shoul not be parsed. This is a reson for all bugs (not passing end tag and marked red open tag). If construction like this would be used <Scope>..</Scope>, would be no problem.
I would think about this issue, but for now, except of disabling, dont see easy solution.

I have added "Do... Loop While" to basic_spec.xml. You can verify in 1.41 release :) It was necessary to release it so soon because I have found some critical bugs.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]