Skip to main content



      Home
Home » Modeling » TMF (Xtext) » associatedPath may not be null
associatedPath may not be null [message #1443382] Sun, 12 October 2014 12:57 Go to next message
Eclipse UserFriend
Hi,

I've created a subclass of JvmModelGenerator to customize the code generated for my Xtext language. However, during compilation of (apparently) any source files I get an IllegalArgumentException that says "associatedPath may not be null" from
org.eclipse.xtext.generator.trace.TraceRegion (stack trace appended below).

Comparing my code to JvmModelGenerator, I don't see what I'm doing differently, but then I don't quite understand what the assumptions of the trace API are. I've tried to figure it out, but there are in fact several places where LocationData objects are created with a null path explicitly.

Could someone give me a hint about what I may be doing wrong? Or even just a summary about how the trace API should be used? Any tips on how to figure out which calls to ITreeAppendable.trace or ITreeAppendable.append might be generating the offending regions would also be appreciated.

Thanks,
Owen

964  [Worker-2] ERROR org.eclipse.xtext.builder.trace.TraceForStorageProvider  - associatedPath may not be null
java.lang.IllegalArgumentException: associatedPath may not be null
	at org.eclipse.xtext.generator.trace.TraceRegion.<init>(TraceRegion.java:52)
	at org.eclipse.xtext.generator.trace.TraceRegionSerializer$IdentityStrategy.createRegion(TraceRegionSerializer.java:58)
	at org.eclipse.xtext.generator.trace.TraceRegionSerializer$IdentityStrategy.createRegion(TraceRegionSerializer.java:1)
	at org.eclipse.xtext.generator.trace.TraceRegionSerializer.doReadFrom(TraceRegionSerializer.java:165)
	at org.eclipse.xtext.generator.trace.TraceRegionSerializer.doReadFrom(TraceRegionSerializer.java:139)
	at org.eclipse.xtext.generator.trace.TraceRegionSerializer.readTraceRegionFrom(TraceRegionSerializer.java:128)
	at org.eclipse.xtext.builder.trace.TraceForStorageProvider$CachedTraces.getTraceRegion(TraceForStorageProvider.java:146)
	at org.eclipse.xtext.builder.trace.TraceForStorageProvider$1.getTraceRegion(TraceForStorageProvider.java:174)
	at org.eclipse.xtext.builder.trace.AbstractTrace.doGetRootTraceRegion(AbstractTrace.java:116)
	at org.eclipse.xtext.builder.trace.AbstractTrace.getRootTraceRegion(AbstractTrace.java:108)
	at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.findRootTraceRegion(DebugSourceInstallingCompilationParticipant.java:193)
	at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:124)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

[Updated on: Sun, 12 October 2014 13:00] by Moderator

Re: associatedPath may not be null [message #1444127 is a reply to message #1443382] Mon, 13 October 2014 13:21 Go to previous message
Eclipse UserFriend
Hi Owen,

without code and an actual stacktrace, it's almost impossible to tell
what's going wrong on your side. If you look at TraceRegion, the
contract is rather plain: Either your location data has a path or your
parent.

But the problem seems to be that you are trying to solve to many issues
on the code generation layer rather than the more abstract model inferrer.

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Previous Topic:Problem When Resolving Cross References of One DSL to Another
Next Topic:Separating JVM model and its implementation
Goto Forum:
  


Current Time: Tue Jul 15 14:38:22 EDT 2025

Powered by FUDForum. Page generated in 0.04480 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top