|
From: <tor...@t-...> - 2004-09-21 19:00:03
|
> 3. I've run the code through the debugger, and I don't see where > NatureTests should run into asynchronous problems. All the changes to > the model appear to happen on the main thread. I added the missing 'project.waitForAutoBuild()' after 'BeansCoreUtils.removeProjectNature()' in NatureTest. This is necessary because the model is updated asynchronously via org.springframework.ide.eclipse.beans.core.internal.model.resources.Bean sResourceChangeListener after the workspace has finished it's autobuild. We have to listen for IResourceChangeEvent.POST_AUTO_BUILD events. > 4. I'm looking into why the wait for autobuild isn't sufficient to > prevent unpredictable results for the validation tests The old version of BeansResourceChangeListener listened to IResourceChangeEvent.POST_CHANGE events. These are sent during (and not after finishing) the autobuild. This is to early for us because the workspace tree is still locked and we are not allowed to manipulate problem marker yet. The new version of BeansResourceChangeListener listens for IResourceChangeEvent.POST_AUTO_BUILD events now. Additionally it looks for modified Java source files which contains Java types which are used as bean classes. For any modified bean class's Java type the corresponding BeansConfigs are automatically re-validated. This implements the feature request from JIRA issue #IDE-21. Cheers, Torsten On 21.09.2004, at 03:20, Loren Rosen wrote: > A bunch of comments: > 1. It should be possible to support both Eclipse 2 and 3, but it's > likely to be a lot of work, work that could instead go into developing > new features. > 2. The folks who wrote the "Building Commercial-Quality Eclipse > Plugins" book were faced with supporting Eclipse 2 and 3 for their > plugins, and utlimately decided to use a pre-processor. See > http://www.qualityeclipse.com/?page=ant/tools/content.html > and also their presentation at EclipseCon > http://www.eclipsecon.org/EclipseCon_2004_TechnicalTrackPresentations/ > 19_Clayberg_Rubel.pdf > 3. I've run the code through the debugger, and I don't see where > NatureTests should run into asynchronous problems. All the changes to > the model appear to happen on the main thread. > 4. I'm looking into why the wait for autobuild isn't sufficient to > prevent unpredictable results for the validation tests > > > On Sun, 19 Sep 2004 17:01:09 +0200, Torsten Juergeleit > <tor...@t-...> wrote: >> I'm up and running with Loren's tests too. Nice stuff. >> >> Yes, it seems we have issues with asynchronous modifications from >> within different threads. One thread is the model's >> ResourceChangeListener which updates the model on resource >> modifications and another thread is the Eclipse UI thread with Spring >> IDE UI's write access to the model [configuration dialogs -> >> BeanProject.setConfigs()]. >> >> We have to make the bean model thread safe by introducing some >> locking >> mechanism and batch operations as the Java model does. Modifications >> to >> the beans model could leverage Eclipse 3.0's new job scheduling API >> [JobManager.newLock()]. >> >> Additionally I ran into problems with the validator running while the >> workspace tree is locked (used to re-validate on changes of bean >> classes in the Java model). In this state the workspace (which >> supports >> multiple concurrent readers but only one concurrent writers) does not >> allow modifications, e.g. manipulation of problem markers. So I have >> to >> introduce batched validations which are running after the workspace >> tree is unlocked again. This is done most easily with the job API too. >> >> But this means we have to drop support for Eclipse 2.x!!! We will have >> a lot of complains from Eclipse 2.x or WSAD users. >> >> What do you think? >> >> I have updated the CVS head of Spring IDE with the following new >> features: >> >> - IBeansProject has a new method "Collection getConfigs(String >> className)" to retrieve all IBeanConfig instances which are using the >> specified bean class -> required for re-validation of IBeanConfigs >> after modifications of bean classes in the Java model (JIRA issue >> #IDE-21) >> >> - UI's editor context menu actions (open type and show in view) have >> an >> action set and commands with configurable keybindings (JIRA issue >> #IDE-4) >> >> Cheers, >> Torsten >> >> >> On 17.09.2004, at 23:48, Loren Rosen wrote: >> >>> I have occasionally seen intermitant assertion failures, though not >>> in >>> that particular place. I agree that something asychronous is a likely >>> culprit. >>> >>> A few lines above the failing assertion, you'll see that the thread >>> waits for the autobuild to complete (autobuilding apparently runs >>> asynchronously on another thread). Perhaps there's yet another thread >>> doing work here that we don't know about. >>> >>> It's of course not a solution, but it would be instructive to put the >>> test thread asleep for several seconds just before this assertion. >>> >>> One thing I'll do over the weekend or on Monday is see if I can get >>> the debugger to tell me what threads are running, or maybe put some >>> breakpoints in the bean model code and see it's being modified >>> asynchronously. >>> >>> >>> On Fri, 17 Sep 2004 17:58:50 +0100, Watkins, David >>> <dav...@fa...> wrote: >>>> Loren, >>>> >>>> Just checked out the new project and am up and testing! >>>> >>>> However it is behaving a little strangely - Most of the time >>>> everything >>>> works and I get the green bar, but sometimes (<10%) I get a red bar >>>> (always with the same trace) >>>> >>>> junit.framework.AssertionFailedError >>>> at junit.framework.Assert.fail(Assert.java:47) >>>> at junit.framework.Assert.assertTrue(Assert.java:20) >>>> at junit.framework.Assert.assertTrue(Assert.java:27) >>>> at >>>> org.springframework.ide.test.NatureTests.testNatureAddAndRemove(Natu >>>> re >>>> Te >>>> sts.java:70) >>>> ....[snip].... >>>> >>>> Not 100% sure whats going on, I'm guessing that sometimes the model >>>> is >>>> not being updated with the project before that line of code runs. >>>> This >>>> would tally with some of the things I've seen with the refactoring >>>> stuff >>>> I've been working on.... >>>> >>>> Cheers, >>>> dw >>>> >>>> >>>> >>>> >>>>> -----Original Message----- >>>>> From: spr...@li... >>>>> [mailto:spr...@li...] >>>>> On Behalf Of Loren Rosen >>>>> Sent: 17 September 2004 17:34 >>>>> To: spr...@li... >>>>> Subject: [Springide-eclip-developer] test package checked in >>>>> >>>>> I've checked in the beginnings of the test package, as a >>>>> separate CVS module. (Problem earlier was I was somehow using >>>>> the pserver protocol to talk to sourceforge instead of extssh.) >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one >>>>> of 170 Project Admins to receive an Apple iPod Mini FREE for >>>>> your judgement on who ports your project to Linux PPC the >>>>> best. Sponsored by IBM. >>>>> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >>>>> _______________________________________________ >>>>> Springide-eclip-developer mailing list >>>>> Spr...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/springide-eclip- >>>>> developer >>>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >>>> Project Admins to receive an Apple iPod Mini FREE for your judgement >>>> on >>>> who ports your project to Linux PPC the best. Sponsored by IBM. >>>> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >>>> _______________________________________________ >>>> Springide-eclip-developer mailing list >>>> Spr...@li... >>>> https://lists.sourceforge.net/lists/listinfo/springide-eclip- >>>> developer >>>> >>> >>> >>> ------------------------------------------------------- >> >> >>> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >>> Project Admins to receive an Apple iPod Mini FREE for your judgement >>> on >>> who ports your project to Linux PPC the best. Sponsored by IBM. >>> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >>> _______________________________________________ >>> Springide-eclip-developer mailing list >>> Spr...@li... >>> https://lists.sourceforge.net/lists/listinfo/springide-eclip- >>> developer >>> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >> Project Admins to receive an Apple iPod Mini FREE for your judgement >> on >> who ports your project to Linux PPC the best. Sponsored by IBM. >> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >> _______________________________________________ >> Springide-eclip-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springide-eclip-developer >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Springide-eclip-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springide-eclip-developer > |