Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350388 - [xtext.mwe2] misleading IAE for missing or not (yet) existing classpath entries
Summary: [xtext.mwe2] misleading IAE for missing or not (yet) existing classpath entries
Status: CLOSED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-26 14:40 EDT by Michael Clay CLA
Modified: 2012-11-21 08:58 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Clay CLA 2011-06-26 14:40:55 EDT
running the default (wizard) created GenerateMyDsl.mwe2 for a project with non existing classpath folders
yields a misleading respectively not necessary illegal argument exception:

steps to reproduce:

1. disable automatic builds (i.e. defers the actual classpath folder creation to the first project build)
2. create a new xtext project
3. run the default workflow file

1    [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Unsupported path : /Users/mclay/workspace/runtime-EclipseApplication/org.xtext.example.mydsl/bin (only folders and archives are supported).
java.lang.IllegalArgumentException: Unsupported path : /Users/mclay/workspace/runtime-EclipseApplication/org.xtext.example.mydsl/bin (only folders and archives are supported).
	at org.eclipse.xtext.mwe.PathTraverser.findAllResourceUris(PathTraverser.java:46)
	at org.eclipse.xtext.mwe.PathTraverser.resolvePathes(PathTraverser.java:33)
	at org.eclipse.xtext.mwe.RuntimeResourceSetInitializer.getPathToUriMap(RuntimeResourceSetInitializer.java:54)
	at org.eclipse.xtext.mwe.RuntimeResourceSetInitializer.getInitializedResourceSet(RuntimeResourceSetInitializer.java:72)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.findModule(Mwe2Runner.java:112)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:77)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:64)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:55)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)


i suggest to filter non existing java.classpath entry urls to avoid misleading IAE's mentioned above.
Comment 1 Dennis Huebner CLA 2012-03-07 08:17:38 EST
Good idea...
Comment 2 Sven Efftinge CLA 2012-11-21 08:58:34 EST
Throwing an exception for a non existent classpath entry seems reasonable to me. Also I don't see why the message is missleading.