VS2010 Shell Editor shows an exception when loading .PAS modules

When loading Prism modules (.PAS) in XE2 I receive an exception in VS-2010 Shell (shipped with Prism XE2). This causes the syntax highlighting and code completion to be very temperemental!

Installation is a default installation on Windows 7 Ultimate x64
Installation was performed using "Run as Administator"
Have installed the latest (Update 3) Prism updates, again using “Run as Administrator”

This is from the ActivityLog.XML file generated by VS2010

System.Exception: Could not locate parser! at RemObjects.Oxygene.VisualStudio.Editor.OxygeneClassifier1.get_Parser() at RemObjects.Oxygene.VisualStudio.Editor.OxygeneClassifier1.GetClassificationSpans(SnapshotSpan span) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.d__0.MoveNext() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.d__16.MoveNext()

Does anyone know how to fix this … looks like an installation problem.

Hello,

Could not locate parser! at
Does anyone know how to fix this

Currently we are not supporting code completion for files that are opened without project. Syntat highlighting could also miss some types etc.
Please try to load solution and open file within that solution. In that case you’ll get correct code completion and syntax highlighting.

Please let us know if you have any other problems with Prism XE2 or if you have such errors for files with loaded solution.

Best regards.

"Please try to load solution and open file within that solution … "
But I am opening the file within a solution

We’re having trouble reproducing this. Just to be clear - you’re loading a file that’s in a project in the current solution, and seeing this error?

Also, are you still on XE2 RTM? or have you upgraded to a more recent release?

As Viktoria noted earlier, there are problems when using 'File | Open file" and picking a file that’s not in a currently loaded project. We’ll be addressing this in an upcoming release.

To be clear :- Yes, I am loading a file as part of a project in the current solution.

I have upgraded to the latest Release (November 2011) - installed using default options, and “Run as Administrator”.

I have exactly the same problem…

We cannot reproduce that problem here. Could you please provide us more details about your Prism XE2 installation? What version do you use, did you try to install latest updates for Prism?
Also do you notice the problem apeears with any prism project (newly created class library for example etc.) or only one project?

Doesn’t seem to happen with a blank project. If I save my project with a non .pas file active and then open it, it doesn’t error until I click on a .pas file.

Visual Studio activity log attached.

Here are the details of my installation:

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel

Installed Version: IDE Standard

Microsoft Visual Web Developer 2010 01011-532-2002361-70435
Microsoft Visual Web Developer 2010

AnkhSVN - Subversion Support for Visual Studio 2.3.10509.1073
AnkhSVN - Subversion Support for Visual Studio 2.3.10509.1073

  • Ankh.Package 2.3.10509.1073
  • Subversion 1.7.1 via SharpSvn 1.7001.1937.11872

SharpSvn is linked to: Apr 1.4.5, Apr-util 1.3.12, Neon 0.29.6, OpenSSL 1.0.0e 6 Sep 2011, serf 1.0.0, SQLite 3.7.7.1, Subversion 1.7.1-SharpSvn-1.7.1, ZLib 1.2.5
SharpSvn is dynamically linked to: Cyrus Sasl 2.1.23
SharpSvn is optionally linked to: Berkeley DB 4.4.20, SharpPlink 1.7001.1937.11872

Embarcadero dbExpress 16.0.4233.42457
Embarcadero dbExpress Data Designer for Visual Studio

Embarcadero Prism 5.0.31.951
Embarcadero Prism
Copyright © 2008-2011 Embarcadero Technologies, Inc. All rights reserved.
Powered by the Oxygene Language for .NET, created by RemObjects Software.

All Embarcadero brand and product names are trademarks or registered trademarks of Embarcadero Technologies, Inc. in the United States and other countries. Oxygene is a trademark of RemObjects Software, LLC in the United States and other countries. All other marks are the property of their respective owners.

Dedicated to Rick Wright (1943-2008).
Enjoy the Great Gig in the Sky.

Hotfix for Visual Studio 2010 Shell (Integrated) - ENU (KB2548139) KB2548139
This hotfix is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2548139.

Hotfix for Visual Studio 2010 Shell (Integrated) - ENU (KB2549864) KB2549864
This hotfix is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2549864.

RemObjects Everwood 3.0.23.317
RemObjects Everwood for .NET
Copyright 2003-2011 RemObjects Software, LLC. All rights reserved.
http://www.remobjects.com/everwood

RemObjects Oxygene 5.0.31.951
RemObjects Oxygene
Copyright 2003-2011 RemObjects Software, LLC. All rights reserved.
http://www.remobjects.com/oxygene
http://www.theoxygenelanguage.com

RemObjects SDK for .NET 6.0.55.957
RemObjects SDK for .NET
Copyright 2002-2011 RemObjects Software, LLC. All rights reserved.
http://www.remobjects.com/ro

Visual Studio 2010 Shell (Integrated) - ENU Service Pack 1 (KB983509) KB983509
This service pack is for Visual Studio 2010 Shell (Integrated) - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.

Thank you for the info. So the problem appears only for the one project.
What type of project is it? Did you created it with Prism XE2 or previous Prism releases?

It will be very helpful if you could provide us with testcase.

This is an ASP.NET website project (File…New…ASP.NET). It was created with a previous version of Prism. However, I just created a new project and copied across just my .pas files and the same problem occurs.

I then removed all my code, and the same problem still happens!

Therefore open the attached project. I’m running Windows 7 64bit on an HP machine.

If you don’t get an error straight away try clicking on Librios.Web.API.pas (under App_Code) in the Solution Explorer.

Thank you for the testcase. I think we’ve finally nailed this one down. The fix will be in an upcoming beta release.

Looks like this has been fixed in the January 2012 release (Update 4). Nice work folks!

thanx for the confirmation — glad it’s all working for you now.