Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346041

Summary: CompilationFileProvider does not handle files from linked folders
Product: [Modeling] TMF Reporter: Karsten Thoms <karsten.thoms>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: RC2   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Karsten Thoms CLA 2011-05-17 03:38:32 EDT
When starting a runtime instance from a Xtext development workspace, Xtend files may be found in the compilation output directory from projects of the development workspace. In this case, the /bin folder of the plugin from the development workspace is a linked folder. When Xtend tries to build files within the linked folder the following error occurs:

java.lang.IllegalArgumentException: Cannot detect IFile for platform:/resource/.org.eclipse.jdt.core.external.folders/.link4/org/eclipse/xtext/generator/serializer/SemanticSequencer.xtend
	at org.eclipse.xtext.xtend2.ui.builder.CompilationFileProvider.getFile(CompilationFileProvider.java:51)
	at org.eclipse.xtext.xtend2.ui.builder.Xtend2BuilderParticipant.processDelta(Xtend2BuilderParticipant.java:94)
	at org.eclipse.xtext.xtend2.ui.builder.Xtend2BuilderParticipant.build(Xtend2BuilderParticipant.java:75)
	at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant.build(RegistryBuilderParticipant.java:60)
	at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:160)
	at org.eclipse.xtext.builder.impl.XtextBuilder.fullBuild(XtextBuilder.java:182)
	at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:85)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:717)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:310)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:385)
	at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2310)
	at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
	at org.eclipse.core.internal.resources.Project.build(Project.java:124)
	at org.eclipse.xtext.builder.impl.BuildScheduler$BuildJob.run(BuildScheduler.java:101)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.apache.log4j 4 0 2011-05-17 09:31:44.484
!MESSAGE org.eclipse.xtext.xtend2.ui.builder.Xtend2BuilderParticipant  - Error compiling platform:/resource/.org.eclipse.jdt.core.external.folders/.link4/org/eclipse/xtext/generator/serializer/SemanticSequencer.xtend
Comment 1 Sebastian Zarnekow CLA 2011-05-17 03:42:21 EDT
Which exact version of Xtext do you use? There were recent changes in this component that fixed issues like that.
Comment 2 Karsten Thoms CLA 2011-05-17 06:10:55 EDT
I have updated to the latest nightly before
Comment 3 Karsten Thoms CLA 2011-05-17 06:17:16 EDT
Pulled the plugins from Git now again, same behavior
Comment 4 Sebastian Zarnekow CLA 2011-05-30 04:30:08 EDT
The stacktrace does not match the code in the CompilationFileProvider. As the implementation looks good to me (uses IStorage2UriMapper and does not throw an IllegalArgumentException if the resource is not an IFile but an IStorage), I'll mark this ticket as resolved. 

Karsten, please reopen if the problem is still reproducable for you.
Comment 5 Karsten Thoms CLA 2017-09-19 17:15:43 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:27:10 EDT
Closing all bugs that were set to RESOLVED before Neon.0