Changes for page WOLips-Eclipse beginner mistakes and questions
Last modified by Ray Kiddy on 2010/02/27 14:51
From version 138.1
edited by Ray Kiddy
on 2023/11/13 11:56
on 2023/11/13 11:56
Change comment:
Renamed from xwiki:WOL.WOLips-Eclipse beginner mistakes and questions
To version 132.1
edited by Johan Henselmans
on 2007/06/20 04:11
on 2007/06/20 04:11
Change comment:
There is no comment for this version
Summary
-
Page properties (4 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 15 removed)
- ContextualContentAssist.png
- FilterProperties.png
- JavaPrefs.png
- JavaPrefs_10.5.8.png
- JavaRunTimeApplicationSettings.png
- LaunchArgs1.png
- Launchsaving.png
- OpenEntityModelerInNewWindowAnnot.png
- RefactorAfter.png
- Refactorbefore.png
- SeeFileinProject.png
- StrangePerspective1.png
- StrangePerspective2.png
- chooseperspective.png
- filters.png
-
Objects (0 modified, 0 added, 1 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -WOLips - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. kiddyr1 +XWiki.johanhenselmans - Tags
-
... ... @@ -1,1 +1,0 @@ 1 -wikitodo|devtools - Content
-
... ... @@ -1,201 +1,151 @@ 1 1 This document tries to catch the errors that every beginner seems to have to go through before reaching Eclipse/WOLips nirvana. The path is narrow and slippery, but thou shalt be rewarded.... 2 2 3 - {{toc/}}3 +=== The first most common error: === 4 4 5 - =Commonerrors=5 +Eclipse/WOLips does not run properly in java 1.4.2. 6 6 7 - ==The firstmost commonerror:==7 +Run it using **JavaVM1.5**. 8 8 9 - Eclipse/WOLips doesnot run properlyin java1.4.2.9 +Only Way: **1.5**. 10 10 11 -Run it using **JavaVM1.5**. 12 - 13 -Only Way: **1.5**. 14 - 15 15 **One more time: 1.5** 16 16 17 -How to get eclipse running with Java1.5? 13 +==== How to get eclipse running with Java1.5? ==== 18 18 19 -go to /Applications/Utilities/Java/J2SE 5.0/Java Preferences. Select J2SE5.0 15 + go to /Applications/Utilities/Java/J2SE 5.0/Java Preferences. Select J2SE5.0 20 20 21 -[[image: attach:JavaRunTimeApplicationSettings.png]]17 +[[image:JavaRunTimeApplicationSettings.png]] 22 22 23 -== The second most common error == 19 +=== The second most common error === 24 24 25 -=== I can not get help to start in my browser, things work flakey === 21 +==== I can not get help to start in my browser, things work flakey ==== 26 26 27 -{{tip}} 28 -The following is somewhat out of date - in general terms it is still true but (as of mid-Feb 2009) Eclipse 3.4(.1) is the required version for (nightly and stable) WOLips, and WOLips nightly is around build number (3.4.)5676. 29 -{{/tip}} 23 +Eclipse 3.2.2 is a big, big project. It uses lots of frameworks. Sometimes these frameworks are already in some way available in your environment, but they are old versions, that do not do the expected thing in Eclipse. I had the experience that the help did not start in the browser. If that happens to you, remove all the jars of which you are not sure why they are there in /Library/Java/Extensions. You do not have to remove things like frontbase.jar, postgresql.jar etc. 30 30 31 - Eclipse3.3is abig, big project. Ituses lots of frameworks. Sometimes these frameworks are already in some way available inyourenvironment, but they are old versions, that do not do the expectedthinginEclipse.I had the experience that the helpdidnotstartinthebrowser.If thatappensto you,removeallthejars of which you arenotsure whyheyaretherein/Library/Java/Extensions.Youdo nothave toemovethingslike frontbase.jar,postgresql.jaretc.25 +This is actually fixed in Eclipse 3.3 (Eclipse reads first it's own paths, and then the system paths), but WOLips does not support Eclipse3.3 yet. 32 32 33 -Th isshould actually fixed in Eclipse 3.3 (Eclipsereadsfirst it'sown paths, andthenthe system paths), but WOLips supports Eclipse3.3onlyin thenightly builds. For3.2.2 you should use the stable build.27 +=== The third most common error === 34 34 35 -== The thirdmostcommonerror==29 +==== WOLips does not behave like you describe. (Use nightly) ==== 36 36 37 - ===WOLips does not behave like you describe.(Use nightlyonly on3.3)===31 +WOLips updates often. And although there is a stable version, the nightly version is where it's at. It is used in production by the wonderful people from MDimension who develop WOLips and other WebObjects developers. If something breaks in nightly, it gets fixed immediately. They depend on it themselves. 38 38 39 - WOLips updates often. There is a stable version, (4118)thatshouldbeusedonEclipse 3.2.2, thenightlyversionis whereit's atnowfor3.3 (Officially released29th of june 2007). Itis usedin production by thewonderfulpeoplefromMDimensionwhodevelopWOLipsandotherWebObjectsdevelopers. Ifsomething breaksinnightly, it getsfixed immediately.They dependonit themselves.33 +http:~/~/webobjects.mdimension.com/wolips/nightly/ should be in your Eclipse update site, under Help->Software Update->Find and install->Search for new features to install 40 40 41 - [[http:~~/~~/webobjects.mdimension.com/wolips/nightly/>>url:http://webobjects.mdimension.com/wolips/nightly/||shape="rect"]]should bein yourEclipse updatesite,under Help->Software Update->Findand install->Search fornew features to install35 +=== The fourth most common error === 42 42 43 -== Thefourthmostcommonerror ==37 +==== I can not install the projects I built, the WOLips install does not work, strange things happen. (be admin) ==== 44 44 45 - ===Ican not install the projectsIbuilt, theWOLips install doesnotwork,strangethingshappen.(beadmin)===39 +Allthough we all know that we should not run as admin, for installing Eclipse you'd better be. If you have installed Eclipse on one of the common places, or it has been installed for you, than the permission from the Eclipse folder will prevent you to install WOLips and other plugins. Make sure that, if you are installing plugins, You are allowed to do so. 46 46 47 - Allthoughwe all know that weshould not runas admin,for installing Eclipse you'd betterbe. If you have installed Eclipse on one of the common places, or it hasbeen installed for you, than the permissionfrom the Eclipse folder will prevent you to install WOLips and other plugins. Make sure that, if you are installing plugins, You are allowed to do so.41 +==== More admin problems ==== 48 48 49 -If you areingona Macwheremultipleusers willneedtouse Eclipse,youhaveto changeEclipse's permissionsbecause itwillnotallowotherpeopleto installfeatures,even iftheyare in theadmingroup.43 +If installing your frameworks does not work, than it might be that you are running as a plain user, not admin user. The WOLips ant install by default tries to install in /Library/Frameworks, and Apps in /Library/WebObjects/JavaApplications. As a plain user you should not have permission to write there. 50 50 51 - Moreadmin problems45 +=== User questions === 52 52 53 - Ifinstallingyourframeworksdoesnotwork,than it might be that you are running asa plain user, not admin user.The WOLipsant installbydefault tries to install in /Library/Frameworks,and Apps in /Library/WebObjects/Applications. As a plain user you should not have permission to write there.47 +==== Why don't I see all my files? ==== 54 54 55 -= User questions = 56 - 57 -== I created a component but I don't see it in the Components folder! == 58 - 59 -When you create a new component, it will put the component into the highlighted folder in the Package Explorer. For example, if the current highlighted folder is the project name, the component will be created in the top-level folder of the project. So you will find your component there and you can move it to the Components folder. 60 - 61 -So when you create a new component, make sure that you highlight the Components folder, or right-click on the Components folder and select New->Component, it will be created into the good folder. 62 - 63 -== Why don't I see all my files? == 64 - 65 65 Not all the files are presented, some are filtered away. In Package Explorer (In WOLips pespective, the upper left window), go to the right corner of that window, there is a caret. Under this caret, there is a Filter option.Click on it to see what get's filtered away. 66 66 67 -[[image: attach:filters.png]]51 +[[image:filters.png]] 68 68 69 69 As you can see, quite a lot of files are excluded from the view. 70 70 71 -[[image: attach:FilterProperties.png]]55 +[[image:FilterProperties.png]] 72 72 73 -== Where did all my code go? == 57 +==== Where did all my code go? ==== 74 74 75 75 Suppose you suddenly ended up with something like this: 76 76 77 -[[image: attach:StrangePerspective1.png]]61 +[[image:StrangePerspective1.png]] 78 78 79 79 Or this: 80 80 81 -[[image: attach:StrangePerspective2.png]]65 +[[image:StrangePerspective2.png]] 82 82 83 83 Most of the times this is caused by inadvertently clicking on the menu-bar of the subwindow. That window will then fill the whole workspace.Clicking the menubar one more time will restore the view. 84 84 85 85 Or it is happened because your perspective has changed inadertently, because you clicked on a file that caused another perspective to be fired up (like Entitymodeler) You can go to the top right, where there is a place where the currently loaded perspectives are located. Choose WOLips again. You're done. 86 86 87 -[[image: attach:chooseperspective.png]]71 +[[image:chooseperspective.png]] 88 88 89 -== I have the right perspective, but it is all screwed up. == 73 +==== I have the right perspective, but it is all screwed up. ==== 90 90 91 -That happens. A lot, if you are inexperienced. And even if you are experienced. Eclipse does some things inadvertently, and as it does not conform to the Apple Interface guidelines, you might press something that has an other effect in Eclipse. 75 +That happens. A lot, if you are inexperienced. And even if you are experienced. Eclipse does some things inadvertently, and as it does not conform to the Apple Interface guidelines, you might press something that has an other effect in Eclipse. 92 92 93 -Do not worry: there is a menu button, Windown->Reset Perspective that will give you the original settings back. 77 +Do not worry: there is a menu button, Windown->Reset Perspective that will give you the original settings back. 94 94 95 -== Which file from which project am I editing? == 79 +==== Which file from which project am I editing? ==== 96 96 97 -If you open a lot of projects at the same time, you'll sometime find yourself editing a few Session.java or localizable.strings files at the same time. How can you see which file from what project you are editing? There is a simple trick for that: in the Package Explorer window, click on the icon with the two arrows on it. From now on, if you select another file in the editor window, you'll be directed to that file in the project in Package Explorer. 81 +If you open a lot of projects at the same time, you'll sometime find yourself editing a few Session.java or localizable.strings files at the same time. How can you see which file from what project you are editing? There is a simple trick for that: in the Package Explorer window, click on the icon with the two arrows on it. From now on, if you select another file in the editor window, you'll be directed to that file in the project in Package Explorer. 98 98 99 -[[image: attach:SeeFileinProject.png]]83 +[[image:SeeFileinProject.png]] 100 100 101 -== Another app is running than I expected: == 85 +==== Another app is running than I expected: ==== 102 102 103 -Running an app works a bit different from running an app in XCode. 87 +Running an app works a bit different from running an app in XCode. 104 104 105 -Normally you select the project in the Package Explorer, goto to the contextual menu (via right click), then click Run WOApplication. you can also go to the Run menu. Or to the Run icon. 89 +Normally you select the project in the Package Explorer, goto to the contextual menu (via right click), then click Run WOApplication. you can also go to the Run menu. Or to the Run icon. 106 106 107 107 Don't suppose you are running the app you are running because you selected the project and pressed the run button in the toolbar. It will run the last application you have run, no matter what you have selected in the package explorer. You have to do a "run as", select your program and then you might get your app. 108 108 109 -== I want to run my app with some other arguments. == 93 +=== I want to run my app with some other arguments. === 110 110 111 -The way eclipse works, it saves a set of arguments in which your app has run. This set of arguments have some default settings, depending on which type of application you are running. You can save these arguments in your project, for later use. 95 +The way eclipse works, it saves a set of arguments in which your app has run. This set of arguments have some default settings, depending on which type of application you are running. You can save these arguments in your project, for later use. 112 112 113 -== Changing the Launch arguments: == 97 +==== Changing the Launch arguments: ==== 114 114 115 -Select Project in Package Explorer, from menu choose Run->Run... , from contextual menu choose Run As->Run 99 +Select Project in Package Explorer, from menu choose Run->Run... , from contextual menu choose Run As->Run 116 116 117 -[[image: attach:LaunchArgs1.png]]101 +[[image:LaunchArgs1.png]] 118 118 119 -You'll get into the create,manage and run configurations window. If there are any launch configurations available in your projects, you will already see them here. If there aren't any, a new one will be created. Normally the proper settings for a WOApplication are all in place, if you have created the application from the contextual menu. See the tutorials.103 +You'll get into the create,manage and run configurations window. If there are any launch configurations available in your projects, you will already see them here. If there aren't any, a new one will be created. 120 120 121 - te that ifyouareoverriding aparameter supplied by WebObjects,such as WOPortorWOAutoOpenInBrowser,then youneedtoadd theparametersettingsin theArgumentstab thatyouseeabove.Forxample, you can add"-WOPort55555 -WOAutoOpenInBrowserNO". BUT, youalsoeedtounchecktheseentries inthe "WO" tababove.If you do uncheckthem,your suggestions may be ignored.105 +Normally the proper settings for a WOApplication are all in place, if you have created the application from the contextual menu. See the tutorials. 122 122 123 -By default these settings are stored in the workspace, not in the project. If you want to store them in the project, you have to change the settings under the "Common" tab, from "local" file to "shared file", and you can save it then in your project for future use. 107 +By default these settings are stored in the workspace, not in the project. If you want to store them in the project, you have to change the settings under the "Common" tab, from "local" file to "shared file", and you can save it then in your project for future use. 124 124 125 -[[image: attach:Launchsaving.png]]109 +[[image:Launchsaving.png]] 126 126 127 -== I want to open EntityModeler in a new window, so it does not get in the way of WOLips == 111 +==== I want to open EntityModeler in a new window, so it does not get in the way of WOLips ==== 128 128 129 129 There is a setting in the WOLips preferences, which will get your EOModel started in a separate EntityModelere window: 130 130 131 -[[image: attach:OpenEntityModelerInNewWindowAnnot.png]]115 +[[image:OpenEntityModelerInNewWindowAnnot.png]] 132 132 133 -== I see all that magic typing with code completion going on. How do you do that? == 117 +==== I see all that magic typing with code completion going on. How do you do that? ==== 134 134 135 -The shortcut is C ontrol-space on the Mac, by default. It is also known as contextual assist.119 +The shortcut is CMD-space on the Mac, by default. It is also known as contextual assist. 136 136 137 -Actually, it is real magic. The trick is that it works in a contextual way. So the program knows what kind code can be expected where. For instance, if you are inside the bindings of a WOComponent, it will know which bindings are there. Just press C ontrol-Space, and you will get the possible endings.121 +Actually, it is real magic. The trick is that it works in a contextual way. So the program knows what kind code can be expected where. For instance, if you are inside the bindings of a WOComponent, it will know which bindings are there. Just press CMD-Space, and you will get the possible endings. 138 138 139 -[[image: attach:ContextualContentAssist.png]]123 +[[image:ContextualContentAssist.png]] 140 140 141 -{{warning}} 142 -Please note that Control-Space is also the key combo for Spotlight. You need to either change the key combo for Eclipse (Preferences->General->Keys) or for Spotlight (System Prefences->Spotlight). 143 -{{/warning}} 125 +==== Which shortcuts are available? ==== 144 144 145 -== Which shortcuts are available? == 146 - 147 147 I don't know. It depends on the plugins you are running. Fortunately, there is a shortcut to end all shortcuts: 148 148 149 -cmd-shift-l= show the shortcuts in a popup-window. Pressing cmd-shift-l one more time will show you all the shortcuts via the preferences. 129 +cmd-shift-l= show the shortcuts in a popup-window. Pressing cmd-shift-l one more time will show you all the shortcuts via the preferences. 150 150 151 151 Some general Eclipse shortcuts: 152 152 153 153 cmd-1 = Quickfix: suggest you a fix for your errror 154 - 155 - 134 +cmd-e = quick switch to other open documents 135 +cmd-space = completion, also known as content assist. This one screws up with the standard settings for Spotlight, which are also cmd-space. Some have tried to move cmd-space to something else in Eclipse, but that does not seems to be picked up everywhere. Better replace Spotlight to something else. 156 156 157 157 Some shortcuts that are available from WOLips (gracefully donated by Mike Schrag): 158 158 159 159 Ten ShortCut Commandments for Mike: 160 - 161 - 162 - 163 - 164 - 165 - 166 - 167 - 168 - 169 - 140 +cmd-shift-t = open type 141 +cmd-shift-r = open resource 142 +cmd-shift-o = auto-import 143 +cmd-opt-r = refactor rename (global) 144 +cmd-2 r = refactor local rename 145 +cmd-opt-1 / 2 / 3 = switch between java/wod/html 146 +cmd-o = in-place outline view 147 +cmd-o o = include superclass 148 +cmd-shift-g = show references 149 +F3 = go to declaration 170 170 171 -Another nice overview of shortcuts that Edgar Klein sent me can be found here: [[http:~~/~~/eclipse-tools.sourceforge.net/Keyboard_shortcuts_(3.0).pdf>>url:http://eclipse-tools.sourceforge.net/Keyboard_shortcuts_(3.0).pdf||shape="rect"]]. It can be even printed out on one double page, so you can put it above your bed. 172 - 173 -== I have the choice of doing a WOApplication or a WOnderApplication, which one should I use ? == 174 - 175 -If you use WOLips/Eclipse 3.2, or if you use a WOLips 3.3 from before December 2007, the layout for the WOApplication and for the WOnder Application was quite different. Starting in recent (December 2007 and later) builds of WOLips, the layout is the same ("WebObjects Application" use the "Wonder" layout), the only difference between them is that the Wonder-type application and framework will link to the Wonder frameworks (ERJars and ERExtensions), Application.java will extend from ERXApplication and Session.java will extend from ERXSession. 176 - 177 -If you are using a old build of WOLips, you should use the Wonder layout, you just need to remove the references to ER* if you don't use Wonder. 178 - 179 -== If I right-click on an folder and select "New", I don't see "EOModel" or "WOComponent" as options. == 180 - 181 -Make sure that your current perpective is "WOLips", if you are in the "Java" or "J2EE" perpective, all WebObjects-related file types are not available. 182 - 183 -== Component Bindings are Showing Errors, but No Error Is Present == 184 - 185 -This can occur for example where you are overriding {{code language="none"}}valueForKey(..){{/code}} and so the component editor is not able to know that a keypath is valid. In this case add {{code language="none"}}//VALID{{/code}} at the end the association and Eclipse will stop taking this to be a bad binding. An example follows; 186 - 187 -{{noformat}} 188 - 189 -SomeString : WOString { 190 -value = foo.bar; //VALID 191 -} 192 - 193 -{{/noformat}} 194 - 195 -== Classpath Order == 196 - 197 -[App] 198 - [Non-App-Projects] 199 - [Non-Apple-Framework jars] 200 - [Apple-Framework jars] 201 - [normal jars (everything not named Foo.framework/../Foo.jar)] 151 +Another nice overview of shortcuts that Edgar Klein sent me can be found here: [[http://eclipse-tools.sourceforge.net/Keyboard_shortcuts_(3.0).pdf]]. It can be even printed out on one double page, so you
- ContextualContentAssist.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -64.4 KB - Content
- FilterProperties.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -49.7 KB - Content
- JavaPrefs.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -77.8 KB - Content
- JavaPrefs_10.5.8.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -48.5 KB - Content
- JavaRunTimeApplicationSettings.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -82.3 KB - Content
- LaunchArgs1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -99.2 KB - Content
- Launchsaving.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -155.3 KB - Content
- OpenEntityModelerInNewWindowAnnot.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -111.3 KB - Content
- RefactorAfter.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -58.4 KB - Content
- Refactorbefore.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -53.1 KB - Content
- SeeFileinProject.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -111.3 KB - Content
- StrangePerspective1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -93.9 KB - Content
- StrangePerspective2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -87.7 KB - Content
- chooseperspective.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -28.7 KB - Content
- filters.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -90.7 KB - Content
- XWiki.XWikiComments[0]
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.probert - Comment
-
... ... @@ -1,1 +1,0 @@ 1 -We need to fix the headers levels so it's easier to read and the TOC make sense. - Date
-
... ... @@ -1,1 +1,0 @@ 1 -2007-12-20 08:45:48.0