Syntax Editor with FileBasedAssemblyRepository always empties its cache

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 10 years ago by P. O. - Inosoft GmbH
Version: 13.2.0591
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

Hi,we are using your SyntaxEditor to show .cs files. We create a ProjectAssembly and add our references for the IntelliPrompt.

CurrentLanguage = new CSharpSyntaxLanguage();
ProjectAssembly = new CSharpProjectAssembly("PROJECTNAME");
CurrentLanguage.RegisterProjectAssembly(ProjectAssembly);
ProjectAssembly.AssemblyReferences.Add(referencedAssembly);

 Everything seems to work fine, the IntelliPrompt knows all our types, properties and methods from the references assemblies.

As recommended in our documentation, we also use your caching mechanism for the IntelliPrompt completion lists:

AmbientAssemblyRepositoryProvider.Repository = new FileBasedAssemblyRepository(appDataPath);

 After the SyntaxEditor loaded our AssemblyRepository is filled with all the reflection data (*Reflection.dat).

When our application is about to shut down, we call

var repository = AmbientAssemblyRepositoryProvider.Repository;
if (repository != null)
{
	repository.PruneCache();
}

 as recommended in your documentation.

After this call our AssemblyRepository is cleared completely. There are no more *Reflection.dat-files and the cache can't be used for the next time.

What can we do about this?

Comments (5)

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, thank you for letting us know about this.  It appears to be a bug that was introduced in a past build.  We've found the problem and fixed it for the upcoming maintenance release.


Actipro Software Support

Posted 10 years ago by P. O. - Inosoft GmbH
Avatar

Hello,

will this also be fixed in the 13.2 version or do i have to update to 14.1?

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, it will be part of 2014.1 and beyond only.


Actipro Software Support

Posted 10 years ago by P. O. - Inosoft GmbH
Avatar

Hello,

i just tried your last build (2014.1 build 0602). My bug is fixed and my AssemblyRepository keeps cached on disk. :)

 

I also noticed that you "Reimplemented the XML grammar using type-specific AST nodes".

The AST-Elements that are generated from the input XML now differ from what I know from the past.

 

The old AST Compilation unit had Elements, Nodes and Attributes.

The new one has Elements, ElementAttributes, ElementContents. The "Nodes"-property has been replaced.

 

Is there a way for me to get back to the old AST structure?

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Unfortunately not, the new parser grammar only outputs the new AST model which is really much nicer.  It has all the same info as before but in a type-specific AST node structure.  You can see all the node types in the ActiproSoftware.Text.Languages.Xml.Ast.Implementation namespace.  The root node would be a CompilationUnit, which has a Nodes property.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.