Closed GoogleCodeExporter closed 9 years ago
Original comment by laurent....@gmail.com
on 21 Feb 2013 at 9:29
Original comment by laurent....@gmail.com
on 28 Feb 2013 at 2:29
When it tries to create source folders, an exception is generated by the JDT
because one of the computed source folders lives inside another.
Namely, when titanium's project map is fully computed, there's a test source
path set to titanium/test, and a resource source path set to
titanium/test/resources.
To solve this, test source path has to be explicitly overridden, e.g. add:
:test-paths ["test/clojure" "test/java"]
to the project map, and then everything makes sense again.
I'lltry to modify CCW so this kind of error is reported explicitly to the
user, rather than silently logged.
Original comment by laurent....@gmail.com
on 28 Feb 2013 at 3:34
Original comment by laurent....@gmail.com
on 28 Feb 2013 at 4:10
Original comment by laurent....@gmail.com
on 28 Feb 2013 at 4:54
Original comment by laurent....@gmail.com
on 14 Mar 2013 at 10:45
I just retried this and I am getting the error that you probably added to let
us know (I mean this, below: "Cannot nest 'titanium/test/resources' inside
'titanium/test'. To enable the nesting exclude 'resources/' from
'titanium/test' "):
Unhandled event loop exception during blocked modal context.
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.reflect.InvocationTargetException)
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
at ccw.util.eclipse$run_in_background$fn__11846.invoke(eclipse.clj:291)
at clojure.lang.AFn.run(AFn.java:24)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1108)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:992)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:137)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:602)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.lang.reflect.InvocationTargetException
at ccw.util.eclipse$eval11831$fn$reify__11833.run(eclipse.clj:268)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.core.runtime.CoreException: Could not reset project
classpath
at ccw.leiningen.nature$reset_project_build_path$fn__15228.invoke(nature.clj:234)
at ccw.leiningen.nature$reset_project_build_path.doInvoke(nature.clj:228)
at clojure.lang.RestFn.invoke(RestFn.java:442)
at ccw.leiningen.nature$factory$reify__15232$fn__15235.invoke(nature.clj:256)
... 2 more
Caused by: Java Model Exception: Java Model Status [Cannot nest
'titanium/test/resources' inside 'titanium/test'. To enable the nesting exclude
'resources/' from 'titanium/test']
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:784)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3096)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3058)
at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
at ccw.leiningen.nature$reset_project_build_path$fn__15228.invoke(nature.clj:232)
... 5 more
eclipse.buildId=4.3.0.I20130416-0800
java.version=1.6.0_30
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -splash org.eclipse.platform
Command-line arguments: -os win32 -ws win32 -arch x86_64 -splash
org.eclipse.platform
and adding ":test-paths ["test/clojure" "test/java"]" as you said, works,
thanks!
Original comment by atkaaz
on 19 Apr 2013 at 2:41
Titanium uses the standard test directory layout, with test namespaces being
under `test` and matching the directory structure. If CCW cannot handle it, it
also won't be able to handle tens of thousands of other Leiningen-managed
projects.
Original comment by Michael....@gmail.com
on 19 Apr 2013 at 3:47
Michael, this line causes problems:
https://github.com/clojurewerkz/titanium/blob/master/project.clj#L17
It declares a resources folder nested within the test folder. This is not what
Leiningen suggests, AFAIK.
If you remove this (apparently not used anymore?) setting, then everything
should go back to normal with Titanium on CCW.
Original comment by laurent....@gmail.com
on 19 Apr 2013 at 4:49
thanks Laurent, removing that line
:resource-paths ["test/resources"]
works great!
it looks like this after fix:
http://i.imgur.com/A6yPl3E.png
before it looked like this:
http://i.imgur.com/cSXjSP4.png
and after :test-paths fixes (which weren't (as)good) looked like this:
http://i.imgur.com/uXJpBj0.png
and this:
http://i.imgur.com/lwdlqSB.png
Original comment by atkaaz
on 20 Apr 2013 at 3:22
Original issue reported on code.google.com by
atkaaz
on 12 Feb 2013 at 4:47