ScintillaNet folding with custom SciLexer.dll issue

Topics: Developer Forum
Feb 24, 2012 at 7:34 PM

Hello

 

Here is the story

I have the latest ScintillaNet code and SciTE(includes Scintilla) code.
Somehow the ScintillaNet has a prebuilt SciLexer.dll that is 600kb in size, while compiling SciLexer via Scintilla project file in VS2010 generates a 1.8mb SciLexer.dll file. I am not sure if it is a compile flag issue or SciLexer.dll in Scintilla is a custom SciLexer.

When i have a form that has a scintillanet editor window in it, I can set the Folding IsEnabled value and if i turn it to True, of course, the folding will appear, and it won't appear otherwise. This is the behavior that I want, now the problems come when i replace the ScintillaNet original SciLexer.dll with my customized SciLexer.dll.

1. When using a CPP lexer, it DOES NOT and never show and folding capability according to the value of IsEnabled. It is just disconnected one from  the other. totally.

2. I never see any SendRequest from SciNet to Lexer for SCI_SetProperty other than when Folding class is initiated in Scintilla.cs. _folding_IsEnabled is never set.

            b = null;           
foreach (Configuration c in configList)           
{               
if (c.Folding_IsEnabled.HasValue)                   
b = c.Folding_IsEnabled;           
}            
if (b.HasValue)
                Scintilla.Folding.IsEnabled = b.Value;            

never successfully call b.HasValue as true.

 

Why does the original SciLexer.dll have communication with the ScintillaNet DesignerView in the first place?? Is there a hidden code that i am not showing and my editors could not even find the word "Fold" in any other places that i have been investigating?

Can you guys help me find the exact code location where you guys are sending the Folding.IsEnabled value assigned in VS2010 designer view into SciLexer.dll?

 

Thank you, this is kinda urgent.. any help is muchly appreciated

Darren

 

Coordinator
Feb 25, 2012 at 10:12 PM

Here is the Folding.IsEnabled property:

public bool IsEnabled
{
    get
    {
        return Scintilla.Lexing.GetProperty("fold") == "1";
    }
    set
    {
        string s;
        if (value)
            s = "1";
        else
            s = "0";

        Scintilla.Lexing.SetProperty("fold", s);
        Scintilla.Lexing.SetProperty("fold.html", s);
    }
}

It sets the 'fold' property of the current lexer. I would think this has to be done after the lexer has been set.

 

Cheers