Модераторы: Vitalik
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> mystix with unihighlighter 2.04 b, bueler 
:(
    Опции темы
lookfar
Дата 1.12.2006, 10:25 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 6
Регистрация: 1.12.2006

Репутация: нет
Всего: нет



Mystix with no JVCL:

http://www.autoitscript.com/fileman/users/...uses_SynMix.zip

I can compile Mystix using SynMix and the UniHighLighter that is included with  Mystix 0.3.1 (highlighters have a *.xml extension and not *.hgl ) 
Then the editor will load a file with nice syntax highlight and codefolding ...
(what did he use to create the xml files?)



Mystix with no JVCL and using UniHighLighter 2.04b

however If I use Mystix with SynMix and the current Unihighlighter 2.04b I will get nice syntax highlight but no
code folding.
http://www.autoitscript.com/fileman/users/..._and_SynMix.zip

can anyone help ?

sorry I do not speak russian
PM MAIL   Вверх
Seldon
Дата 2.12.2006, 17:13 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 114
Регистрация: 23.12.2005
Где: Minsk

Репутация: нет
Всего: 2



Цитата
however If I use Mystix with SynMix and the current Unihighlighter 2.04b I will get nice syntax highlight but no
code folding.
In file \Source\SynUniHighlighter.inc change line {.$DEFINE CODEFOLDING} to {$DEFINE CODEFOLDING}  

Цитата
what did he use to create the xml files?
Iterface to edit highlighter is in files \Source\SynUniDesignerForm.(dfm|pas). Also you can just compile \UniManager\HglEditor.dpr which use it files.
--------------------
MiBEditor v2.Alpha 10 - Программерский редактор
PM MAIL WWW   Вверх
lookfar
Дата 3.12.2006, 02:06 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 6
Регистрация: 1.12.2006

Репутация: нет
Всего: нет



Цитата(Seldon @ 2.12.2006,  17:13)
Цитата
however If I use Mystix with SynMix and the current Unihighlighter 2.04b I will get nice syntax highlight but no
code folding.
In file \Source\SynUniHighlighter.inc change line {.$DEFINE CODEFOLDING} to {$DEFINE CODEFOLDING}  

Цитата
what did he use to create the xml files?
Iterface to edit highlighter is in files \Source\SynUniDesignerForm.(dfm|pas). Also you can just compile \UniManager\HglEditor.dpr which use it files.

Yes {.$DEFINE CODEFOLDING} is of course set to {$DEFINE CODEFOLDING}

after compile of the  unimanager demo application , CodeFolding works fine but the simple demo and Light editor  CodeFolding will not work.
as well The Mystix editor I ported over will not fold.



not so important as above but when I try load the xml format files into the unimanager I get a "invalid file format" even if I rename to *.hgl


PM MAIL   Вверх
Seldon
Дата 3.12.2006, 03:30 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 114
Регистрация: 23.12.2005
Где: Minsk

Репутация: нет
Всего: 2



Цитата(lookfar @  3.12.2006,  02:06 Найти цитируемый пост)
after compile of the  unimanager demo application , CodeFolding works fine but the simple demo and Light editor  CodeFolding will not work.as well The Mystix editor I ported over will not fold.
I didn't work with codefolding so I can't help you with it. 

Цитата(lookfar @  3.12.2006,  02:06 Найти цитируемый пост)
not so important as above but when I try load the xml format files into the unimanager I get a "invalid file format" even if I rename to *.hgl
File extension no matter. I have old version of Mystix (031 at 31.05.06) - it problem that his highlighters hasn't Info field. 
Mystix:
Код

<UniHighlighter>
 <Range Name="Root">
...

Must be:
Код

<UniHighlighter>
 <ImportantInfo>
  ******* Please read carefully *************************
  * Please, make any changes in this file very carefuly!*
  * It is much more convinient to use native designer!  *
  *******************************************************
 </ImportantInfo>
 <Info>
  <General>
   <Name>Assembler x86</Name>
   <FileTypeName>asm</FileTypeName>
   <Layout>Standard</Layout>
  </General>
  <Author>
   <Name>Vitaly Nevzorov</Name>
   <Email>[email protected]</Email>
   <Web>www.delphist.com</Web>
   <Copyright>Copyright (c) Vitaly Nevzorov, 2002</Copyright>
   <Company>N/A</Company>
   <Remark></Remark>
  </Author>
  <Version>
   <Version>1</Version>
   <Revision>0</Revision>
   <Date>37612.5260155903</Date>
   <Type>Beta</Type>
  </Version>
  <History>
  </History>
  <Sample>
   <S>; x86 assembly sample source</S>
   <S>  CODE    SEGMENT    BYTE PUBLIC</S>
   <S>    ASSUME    CS:CODE</S>
   <S>    PUSH SS</S>
   <S>    POP DS</S>
   <S>    MOV AX, AABBh</S>
   <S>    MOV BYTE PTR ES:[DI], 255</S>
   <S>    JMP SHORT AsmEnd</S>
   <S>    welcomeMsg DB 'Hello World', 0</S>
   <S>    AsmEnd:</S>
   <S>    MOV AX, 0</S>
   <S>    CODE    ENDS</S>
   <S>END</S>
   <S></S>
  </Sample>
 </Info>
 <Range Name="Root">
...

SynUniSyn expected integer numbers in \Info\Version\Version and \Info\Version\Revision tags. Other tags in the Info is not important and can be skipped. If you just add following code between <UniHighlighter> and <Range> tags all must be fine smile
Код

<Info>
  <Version>
    <Version>0</Version>
    <Revision>0</Revision>
  </Version>
</Info>

Or you can change TSynUniFormatNativeXml15.ImportInfo method in the SynUniFormatNativeXml15.pas.

Other problem that Mystix's files hasn't tag with highlighter name, so in the HglEditor you will see blank names for it.
--------------------
MiBEditor v2.Alpha 10 - Программерский редактор
PM MAIL WWW   Вверх
lookfar
Дата 3.12.2006, 04:35 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 6
Регистрация: 1.12.2006

Репутация: нет
Всего: нет



Цитата(Seldon @ 3.12.2006,  03:30)
Цитата(lookfar @  3.12.2006,  02:06 Найти цитируемый пост)
after compile of the  unimanager demo application , CodeFolding works fine but the simple demo and Light editor  CodeFolding will not work.as well The Mystix editor I ported over will not fold.
I didn't work with codefolding so I can't help you with it. 

Цитата(lookfar @  3.12.2006,  02:06 Найти цитируемый пост)
not so important as above but when I try load the xml format files into the unimanager I get a "invalid file format" even if I rename to *.hgl
File extension no matter. I have old version of Mystix (031 at 31.05.06) - it problem that his highlighters hasn't Info field. 
Mystix:
Код

<UniHighlighter>
 <Range Name="Root">
...

Must be:
Код

<UniHighlighter>
 <ImportantInfo>
  ******* Please read carefully *************************
  * Please, make any changes in this file very carefuly!*
  * It is much more convinient to use native designer!  *
  *******************************************************
 </ImportantInfo>
 <Info>
  <General>
   <Name>Assembler x86</Name>
   <FileTypeName>asm</FileTypeName>
   <Layout>Standard</Layout>
  </General>
  <Author>
   <Name>Vitaly Nevzorov</Name>
   <Email>[email protected]</Email>
   <Web>www.delphist.com</Web>
   <Copyright>Copyright (c) Vitaly Nevzorov, 2002</Copyright>
   <Company>N/A</Company>
   <Remark></Remark>
  </Author>
  <Version>
   <Version>1</Version>
   <Revision>0</Revision>
   <Date>37612.5260155903</Date>
   <Type>Beta</Type>
  </Version>
  <History>
  </History>
  <Sample>
   <S>; x86 assembly sample source</S>
   <S>  CODE    SEGMENT    BYTE PUBLIC</S>
   <S>    ASSUME    CS:CODE</S>
   <S>    PUSH SS</S>
   <S>    POP DS</S>
   <S>    MOV AX, AABBh</S>
   <S>    MOV BYTE PTR ES:[DI], 255</S>
   <S>    JMP SHORT AsmEnd</S>
   <S>    welcomeMsg DB 'Hello World', 0</S>
   <S>    AsmEnd:</S>
   <S>    MOV AX, 0</S>
   <S>    CODE    ENDS</S>
   <S>END</S>
   <S></S>
  </Sample>
 </Info>
 <Range Name="Root">
...

SynUniSyn expected integer numbers in \Info\Version\Version and \Info\Version\Revision tags. Other tags in the Info is not important and can be skipped. If you just add following code between <UniHighlighter> and <Range> tags all must be fine smile
Код

<Info>
  <Version>
    <Version>0</Version>
    <Revision>0</Revision>
  </Version>
</Info>

Or you can change TSynUniFormatNativeXml15.ImportInfo method in the SynUniFormatNativeXml15.pas.

Other problem that Mystix's files hasn't tag with highlighter name, so in the HglEditor you will see blank names for it.

Thank you for your help, 
The Mystix editor that uses the older unihighlighter in which for me the code folding works is no good to me because end user cannot easily change the syntax coloring or regions by using the UniManager.


But I do not understand this : using unihighlighter 2.0b4, The simple demo works with:

var
  FoldRegion: TFoldRegionItem;
begin
  FoldRegion := SynUni.FoldRegions.Add(rtChar, False, False, False, '{', '}', nil);
  Edit.InitCodeFolding;
  Edit.Repaint;
end;

but will not load the rules from the *.hgl file
PM MAIL   Вверх
Seldon
Дата 3.12.2006, 04:59 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 114
Регистрация: 23.12.2005
Где: Minsk

Репутация: нет
Всего: 2



Цитата(lookfar @  3.12.2006,  04:35 Найти цитируемый пост)
but will not load the rules from the *.hgl file
from which hgl file? created by UniManager file or Mystix's file?
--------------------
MiBEditor v2.Alpha 10 - Программерский редактор
PM MAIL WWW   Вверх
lookfar
Дата 3.12.2006, 05:48 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 6
Регистрация: 1.12.2006

Репутация: нет
Всего: нет



Цитата(Seldon @ 3.12.2006,  04:59)
Цитата(lookfar @  3.12.2006,  04:35 Найти цитируемый пост)
but will not load the rules from the *.hgl file
from which hgl file? created by UniManager file or Mystix's file?

From the Unimanager file.
I have tried every version on the UniHighlighter web page, I completely remove and re-install between versions in both Delphi 6 and Delphi 7.
No matter what I do I cannot get code folding to work by loading from the *.hgl files.
I just tried the light demo in the form oncreate event:

Код

Edit.CodeFolding.FolderBarColor := clBtnFace;
edit.Gutter.Width := 16;
edit.CodeFolding.FolderBarColor := clScrollBar;
edit.CodeFolding.CollapsedCodeHint:=true;
edit.CodeFolding.CollapsedLineColor:=0;
edit.CodeFolding.HighlighterFoldRegions:=true;
edit.CodeFolding.HighlightIndentGuides:=true;
Edit.CodeFolding.Enabled := True;
edit.InitCodeFolding();


I am using *.hgl file which I have confirmed have fold regions, ie autoit261.hgl:

Код

<CodeFolding>
        <FoldRegion Name="if..endif" Type="1">
            <OpenToken Symbol="IF"/>
            <CloseToken Symbol="ENDIF"/>
            <Properties/>
            <SubRegions/>
        </FoldRegion>
        <FoldRegion Name="while..wend" Type="1">
            <OpenToken Symbol="WHILE"/>
            <CloseToken Symbol="WEND"/>
            <Properties/>
            <SubRegions/>
        </FoldRegion>
        <FoldRegion Name="select..endselect" Type="1">
            <OpenToken Symbol="SELECT"/>
            <CloseToken Symbol="ENDSELECT"/>
            <Properties AllowNoSubs="True"/>
            <SubRegions/>
        </FoldRegion>
    </CodeFolding>
    


I really have no idea of what to try next, I have been trying to make this work for 2 days with no joy


PM MAIL   Вверх
Seldon
Дата 3.12.2006, 16:12 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 114
Регистрация: 23.12.2005
Где: Minsk

Репутация: нет
Всего: 2



hm, maybe codefolding broken in Unihighlighter 2.04b, I really don't known. CodeFolding actively discussed here http://forum.vingrad.ru/topic-106449.html, try links from it.
--------------------
MiBEditor v2.Alpha 10 - Программерский редактор
PM MAIL WWW   Вверх
lookfar
Дата 4.12.2006, 04:30 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 6
Регистрация: 1.12.2006

Репутация: нет
Всего: нет



Цитата(Seldon @ 3.12.2006,  16:12)
hm, maybe codefolding broken in Unihighlighter 2.04b, I really don't known. CodeFolding actively discussed here http://forum.vingrad.ru/topic-106449.html, try links from it.

I removed 2.0 b4 and installed 2.0 b1 and wala I had folding !
So to be sure I re-installed 2.0b4 and this time it worked ... 
however the demos would not work until I placed the next code in the Form OnCreate event:

Код

 {$IFDEF CODEFOLDING}
  Edit.Gutter.Width := 16;
  Edit.CodeFolding.Enabled := True;
  Edit.CodeFolding.CollapsedCodeHint := True;
  Edit.CodeFolding.CollapsingMarkStyle := msSquare;
  Edit.CodeFolding.FolderBarColor := clScrollBar;
  Edit.CodeFolding.FolderBarLinesColor := clBlack;
  Edit.InitCodeFolding();
  {$ENDIF}


If I remove the defines:

Код

  Edit.Gutter.Width := 16;
  Edit.CodeFolding.Enabled := True;
  Edit.CodeFolding.CollapsedCodeHint := True;
  Edit.CodeFolding.CollapsingMarkStyle := msSquare;
  Edit.CodeFolding.FolderBarColor := clScrollBar;
  Edit.CodeFolding.FolderBarLinesColor := clBlack;
  Edit.InitCodeFolding();


Then folding does not work. But I am Happy that it is working!

I will use it in my AutoIt Editor:
http://www.autoitscript.com/fileman/users/lookfar/

and later in Koda (the form Designer)

If anyone likes the AutoEd editor (see screenshots) which has parameter completion, autoProposal completion and code completion all with the dropdown in color .
ask and I will post source code for it.







PM MAIL   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Rules and hints for the forum "SynUniHighlighter"
Vit
Vitalik

Hello, dear user!

This is official forum for SynUniHighlighter component and unofficial forum for SynEdit, Codefolding and all related projects.


Some rules for the forum:

1. Do not create new topic if exactly the same already exists.

2. Don't ask several questions in the same topic. One topic - one question.

3. If discussion changes to far from original topic context, then create a separate thread for new discussion subject.


If you already registered then click here to log in.


If you havent't registered yet then click here and register. You need to type username, password (twice), email (twice) and security code.

Next you need go here and choose English language instead of Russian and press Enter.


Some hints for enghlish-speaking users:

- create new topic;     - create new vote;     - answer to the topic.


With regards, Vit, Vitalik.

 
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | SynUniHighlighter and SynEdit (English Language) | Следующая тема »


 




[ Время генерации скрипта: 0.1056 ]   [ Использовано запросов: 21 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.