Changes for page Debugging WOLips
Last modified by Pascal Robert on 2012/02/11 05:22
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,9 @@ 1 +{{note title="Under Construction"}} 2 + 3 +This page is currently under construction by Mark Ritchie! 4 + 5 +{{/note}} 6 + 1 1 = Debugging WOLips as the master does! = 2 2 3 3 These instructions is intended for the developer who wants to compile and run WOLips source for the purpose of debugging or other exploration. Thanks very much to Mike Schrag for the guidance to get this setup and working! ... ... @@ -14,16 +14,6 @@ 14 14 * Java 1.5.0//19// 15 15 * Eclipse 3.4.2 (eclipse-SDK-3.4.2-macosx-carbon.tar.gz) 16 16 17 -{{panel title="Snow Leopard Update" bgColor="#FFFFCE"}} 18 - 19 -I gave this a go on Snow Leopard and it worked fine with one little detail which I've noted at the end of this page. 20 -Here's the setup I was using: 21 -- Mac OS X 10.6.1 22 -- Java 1.6.0_15 23 -- Eclipse 3.4.2 (eclipse-SDK-3.4.2-macosx-carbon.tar.gz) 24 - 25 -{{/panel}} 26 - 27 27 == Checking out the source code == 28 28 29 29 **A note for the impatient - don't try to checkout the source right into Eclipse. The files aren't structured in a way that allows this to work. I know because I tried to do it that way first!** ;-) ... ... @@ -44,124 +44,23 @@ 44 44 I chose ,,/WOLipsDebugging 45 45 [[image:Workspace.png]],, 46 46 47 -=== Import woenvironment === 43 +=== Import woenvironment === 48 48 49 -Start off by importing the woenvironment project. From the File menu, select Import 50 -[[image:ImportMenu.png]] 51 -Click the disclosure triangle for General and select Existing Projects into Workspace 52 -[[image:ExistingProject.png]] 53 -Click Next button. 54 -Ensure that "Select root directory" is selected and click Browse 55 -Browse to the folder where you checked out the woproject source code above and select woenvironment. 56 -[[image:woenvironmentCheckout.png]] 57 -Eclipse should scan the folder and notice one project in the folder called woenvironment. 58 -**It's important that you don't have 'Copy the project into your workspace' selected.** 59 -[[image:woenvironmentProject.png]] 60 -Click Finish. 61 - 62 -Once Eclipse has finished building the project, there should be no errors! If that's not the case, then you need to back up and make sure that you've followed all the steps above. 63 - 64 64 === Import wolips projects into your workspace === 65 65 66 -Repeat the steps above and import all the wolips projects except for 3! 67 -**EntityModler, eomodeldoc and org.objectstyle.wolips.eomodeler.factories 68 -Are special projects which require special setup and caffination before touching.** 69 - 70 -The import of wolips should look like this: 71 -[[image:wolipsImport.png]] 72 - 73 -And Eclipse should identify a whole bunch of projects. 74 -**Make sure that you deselect the 3 special cases noted above** 75 -The list of projects should look something like this: 76 -[[image:wolipsProjects.png]] 77 - 78 -Click Finish and the projects should all be imported. 79 - 80 -{{note}} 81 - 82 -When I did this I got the following error message. 83 -I have no idea what this means... 84 -!ResourceErrorMessage.png! 85 - 86 -{{/note}} 87 - 88 -Once Eclipse finishes building the projects there are going to be a whole bunch of build errors. Don't Panic. Most of them will resolve themselves after the next steps. 89 - 90 90 === Import wolips plugins === 91 91 92 -In the same way as above, import the core plugins from wolips/core/plugins. Something like this: 93 -[[image:corePluginImport.png]] 94 -[[image:corePluginProjects.png]] 95 - 96 96 === Import 3rd party plugins === 97 97 98 -Finally, import the third party plugins from wolips/3rdparty/plugin. Something like this: 99 -[[image:thridPartyImport.png]] 100 -[[image:thirdPartyProjects.png]] 101 - 102 102 === Close special projects === 103 103 104 -In case you missed the notices above, close these projects. 105 - 106 106 * EntityModeler 107 107 * eomodeldoc 108 108 * org.objectstyle.wolips.eomodeler.factories 109 -(Note: Working on these projects is beyond the scope of what I needed to do. Sorry.) 110 110 111 111 === Close projects which require additional resources to compile === 112 112 113 -These projects require additional resources to compile. As I didn't need them, I just closed them. 114 - 115 -* org.objectstyle.wolips.apple.mavenintegration 116 116 * org.objectstyle.wolips.groovy.ui 117 117 * org.objectstyle.wolips.jprofiler.launching 118 118 119 119 == The run configuration setup == 120 - 121 -At this point, you should have a long list of packages which should all be compiling. 122 -If that's not the case, please document additional steps here, making special note of your setup. 123 - 124 -Getting on with the configuration to be able to test the software which is now compiling. 125 -From the Run menu, select "Debug Configurations ..." 126 -[[image:debugConfiguration.png]] 127 - 128 -Select "Eclipse Application" from the list on the left 129 -and then click the "New" button at the top. 130 -[[image:newLaunchConfiguration.png]] 131 -This creates a new launch configuration which you can customize as you like. 132 -By default it's called 'New//configuration'. For this session, I named it DebugEclipse// 133 - 134 -My preference is to explicitly set the workspace for testing however I'm sure the default will be fine if you like it. 135 -I chose: $workspace//loc}/../WOLipsDebuggingWorkspace 136 -My setup looked something like below however there are lots of configuration options which I didn't need to explore: 137 -[[image:debugConfigured.png]]// 138 - 139 -== Launch the debug version == 140 - 141 -Click the Debug button in the debug configuration window to launch the test version. 142 -This will be a clean version of Eclipse with the workspace which you set and any other settings. 143 -By default, all of the plugins are loaded and ready for testing! 144 -And now, you should be running inside the debug version of Eclipse with all the wolips bits to play with! 145 - 146 -== Snow Leopard Update == 147 - 148 -I was running the carbon version of Eclipse 3.4.2 on Snow Leopard. 149 -Up to this point, I was following the instructions above however when I tried to launch Eclipse, I got this error: 150 - 151 -{{code value="java"}} 152 - 153 -java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM 154 - at org.eclipse.swt.internal.Library.loadLibrary(Library.java:177) 155 - at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151) 156 - ... 157 - 158 -{{/code}} 159 - 160 -This is a known problem and is documented <a href="http:~/~/www.eclipse.org/swt/faq.php#cocoa32launch">here</a> 161 -The fix is to add the --d32 parameter to the launch arguments.-- 162 - 163 -Original: --os $target.os} --ws $target.ws} --arch $target.arch} --nl $target.nl} 164 -Updated: --os $target.os} --ws $target.ws} --arch $target.arch} --nl $target.nl} --d32-- 165 - 166 -My final setup looked like this: 167 -[[image:32Bit_jvm_arguments.png]]