Changes for page Debugging WOLips

Last modified by Pascal Robert on 2012/02/11 05:22

From version 71.1
edited by mark_ritchie
on 2009/09/08 17:56
Change comment: There is no comment for this version
To version 74.1
edited by mark_ritchie
on 2009/09/12 23:11
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,12 +1,14 @@
1 -= Debugging WOLips like the master does! =
1 += Debugging WOLips as the master does! =
2 2  
3 -== The big picture ==
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!
4 4  
5 -These instructions is intended for the developer who wants to compile and run WOLips source for the purpose of debugging or other exploration.
5 +== Overview of what's going on ==
6 6  
7 +We're going to check out the latest source for WOLips, build it and arrange for Eclipse to launch is a debug mode to test it out. It's very handy that Eclipse has a built in ability to launch itself in debug mode and load the local versions of the plugins. If you read the old and out dated instructions floating about that talk about building an entire release and installing them into a new copy of Eclipse then you're going to like this method a whole lot better! ;-)
8 +
7 7  == The setup ==
8 8  
9 -When I wrote this page, I was using:
11 +When I did this and wrote these notes, I was using:
10 10  
11 11  * Mac OS X 10.5.7
12 12  * Java 1.5.0//19//
... ... @@ -14,33 +14,119 @@
14 14  
15 15  == Checking out the source code ==
16 16  
19 +**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!** ;-)
20 +
17 17  === Check out the source code into a local folder ===
18 18  
19 -**A note for the impatient - don't try to checkout the source right into Eclipse**
20 -You're checking out a local copy of the code from the source repository.
21 -Next, we're going to selectively import (but **not** copy) parts of that code into Eclipse.
23 +You're checking out a local copy of the code from the source repository. Next, we're going to selectively import (but **not** copy) parts of that code into Eclipse. I'm using command line subversion to check out the lastest version however feel free to use a different tool or different version, as you like.
22 22  
23 -{{svn co https value="//svn.objectstyle.org/repos/woproject/trunk/woproject woproject"}}{{/svn co https}}
25 +svn co https:~/~/svn.objectstyle.org/repos/woproject/trunk/woproject ,,/woproject,,
24 24  
27 +Note that I've checked out the source code into my home folder. It doesn't matter where you put the source code as long as you can find it in the steps below.
28 +
25 25  === Create a new eclipse workspace ===
26 26  
27 -=== Import woenvironment ===
31 +Launch a clean copy of Eclipse with no plugings installed. Strictly speaking, probably not necessary however these are the steps which I took.
28 28  
33 +Create a new Workspace
34 +I chose ,,/WOLipsDebugging
35 +[[image:Workspace.png]],,
36 +
37 +=== Import woenvironment ===
38 +
39 +Start off by importing the woenvironment project. From the File menu, select Import
40 +[[image:ImportMenu.png]]
41 +Click the disclosure triangle for General and select Existing Projects into Workspace
42 +[[image:ExistingProject.png]]
43 +Click Next button.
44 +Ensure that "Select root directory" is selected and click Browse
45 +Browse to the folder where you checked out the woproject source code above and select woenvironment.
46 +[[image:woenvironmentCheckout.png]]
47 +Eclipse should scan the folder and notice one project in the folder called woenvironment.
48 +**It's important that you don't have 'Copy the project into your workspace' selected.**
49 +[[image:woenvironmentProject.png]]
50 +Click Finish.
51 +
52 +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.
53 +
29 29  === Import wolips projects into your workspace ===
30 30  
56 +Repeat the steps above and import all the wolips projects except for 3!
57 +**EntityModler, eomodeldoc and org.objectstyle.wolips.eomodeler.factories
58 +Are special projects which require special setup and caffination before touching.**
59 +
60 +The import of wolips should look like this:
61 +[[image:wolipsImport.png]]
62 +
63 +And Eclipse should identify a whole bunch of projects.
64 +**Make sure that you deselect the 3 special cases noted above**
65 +The list of projects should look something like this:
66 +[[image:wolipsProjects.png]]
67 +
68 +Click Finish and the projects should all be imported.
69 +
70 +{{note}}
71 +
72 +When I did this I got the following error message.
73 +I have no idea what this means...
74 +!ResourceErrorMessage.png!
75 +
76 +{{/note}}
77 +
78 +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.
79 +
31 31  === Import wolips plugins ===
32 32  
82 +In the same way as above, import the core plugins from wolips/core/plugins. Something like this:
83 +[[image:corePluginImport.png]]
84 +[[image:corePluginProjects.png]]
85 +
33 33  === Import 3rd party plugins ===
34 34  
88 +Finally, import the third party plugins from wolips/3rdparty/plugin. Something like this:
89 +[[image:thridPartyImport.png]]
90 +[[image:thirdPartyProjects.png]]
91 +
35 35  === Close special projects ===
36 36  
94 +In case you missed the notices above, close these projects.
95 +
37 37  * EntityModeler
38 38  * eomodeldoc
39 39  * org.objectstyle.wolips.eomodeler.factories
99 +(Note: Working on these projects is beyond the scope of what I needed to do. Sorry.)
40 40  
41 41  === Close projects which require additional resources to compile ===
42 42  
103 +These projects require additional resources to compile. As I didn't need them, I just closed them.
104 +
105 +* org.objectstyle.wolips.apple.mavenintegration
43 43  * org.objectstyle.wolips.groovy.ui
44 44  * org.objectstyle.wolips.jprofiler.launching
45 45  
46 46  == The run configuration setup ==
110 +
111 +At this point, you should have a long list of packages which should all be compiling.
112 +If that's not the case, please document additional steps here, making special note of your setup.
113 +
114 +Getting on with the configuration to be able to test the software which is now compiling.
115 +From the Run menu, select "Debug Configurations ..."
116 +[[image:debugConfiguration.png]]
117 +
118 +Select "Eclipse Application" from the list on the left
119 +and then click the "New" button at the top.
120 +[[image:newLaunchConfiguration.png]]
121 +This creates a new launch configuration which you can customize as you like.
122 +By default it's called 'New//configuration'. For this session, I named it DebugEclipse//
123 +
124 +My preference is to explicitly set the workspace for testing however I'm sure the default will be fine if you like it.
125 +I chose: $workspace//loc}/../WOLipsDebuggingWorkspace
126 +My setup looked something like below however there are lots of configuration options which I didn't need to explore:
127 +[[image:debugConfigured.png]]//
128 +
129 +== Launch the debug version ==
130 +
131 +Click the Debug button in the debug configuration window to launch the test version.
132 +This will be a clean version of Eclipse with the workspace which you set and any other settings.
133 +By default, all of the plugins are loaded and ready for testing!
134 +And now, you should be running inside the debug version of Eclipse with all the wolips bits to play with!