Posted 14 years ago
by Stuart Lodge
Hi
I'm working with the WPF beta of the .NET add-on and it's great thanks.
The code I'm working on always has the same structure - something like:What I'd like to do is to present the editor so that either:
- the user only sees the "//user enters code here..." block
- or the user sees everything, but can only edit the middle block
Is there any way I can achieve either of these goals with the current Beta?
Thanks for a great product!
Stuart
P.S. I know I've asked this already by email and you suggested: "If you make an IParser class that wraps the real parser on the language and registers itself on the language as the IParser service, you'd first call the wrapped parser and get its return value, then you'd have to wrap the resulting statement list in other AST nodes (like a member, type, and CompilationUnit) that had valid ranges of the entire document range. If you do that, it might allow this to work for now. Let us know how it goes if you try that." - but I've tried that and gotten a bit lost... so any sample/hint would help (hence why I'm asking here on the forum too)
I'm working with the WPF beta of the .NET add-on and it's great thanks.
The code I'm working on always has the same structure - something like:
namespace Sample
{
using System;
using Cirrious.Engine;
public class RunEngine : IEngine
{
public int Run(EngineParameters e)
{
// user enters code here...
}
}
}
- the user only sees the "//user enters code here..." block
- or the user sees everything, but can only edit the middle block
Is there any way I can achieve either of these goals with the current Beta?
Thanks for a great product!
Stuart
P.S. I know I've asked this already by email and you suggested: "If you make an IParser class that wraps the real parser on the language and registers itself on the language as the IParser service, you'd first call the wrapped parser and get its return value, then you'd have to wrap the resulting statement list in other AST nodes (like a member, type, and CompilationUnit) that had valid ranges of the entire document range. If you do that, it might allow this to work for now. Let us know how it goes if you try that." - but I've tried that and gotten a bit lost... so any sample/hint would help (hence why I'm asking here on the forum too)