Larry, I'm not sure how I am going to thank you for all of your help. I do appreciate it very much.
I think I have a better understanding of the purpose of the ROLLING_BACK_INVALID_EDITS_KEY flag now, after your explanation. Let me see if I understand correctly: When performing certain actions, the EditTransaction class will check for invalid geometries. (For Example, a Polygon whose segments cross.) If problems are found the EditTransaction class access the boolean value in the Workbench's Blackboard object that corresponds to the ROLLING_BACK_INVALID_EDITS_KEY key, and sets this value to true. This now allows other code to access the same boolean value identified by this key to see if there are currently any EditTransactions taking place. Do I have this correct? I am still curious about the synchronization issue. I wonder if it would be better to have an individual "flag" for each EditTransaction? Perhaps this is not necessary becuase in OpenJUMP you'll only have one EditTransaction active at a time. I'll have to make it a point to revisit the EditTransaction class and related source code when I have finished with my Coordinate Selectors. Thanks again for the help Larry. Landon On 9/13/06, Larry Becker <[EMAIL PROTECTED]> wrote: > Hi Sunburned, > > > > Why would we ever need to check and see if a CursorTool was rolling > > back some action? > > > > > EditTransaction should not commit the change when invalid geometry is > produce as part of the operation. ROLLING_BACK_INVALID_EDITS_KEY is a flag > that this is occuring so that other parts of the code know what is going on. > It is a blackboard key and not a variable so it should be fine with > synchronization. > > regards, > Larry > > > > On 9/13/06, Sunburned Surveyor <[EMAIL PROTECTED]> wrote: > > > I'm still working my way through the source code for the > AbstractCursorTool class. I've run into some source code that I just > can't figure out, and I need to ask for some help again. > > The source code for the AbstractCursorTool contains this source code: > > protected boolean isRollingBackInvalidEdits() { > return getWorkbench().getBlackboard().get( > EditTransaction.ROLLING_BACK_INVALID_EDITS_KEY, > false); > } > > > I believe this method is supposed to indicate if the CursorTool is > currently in the process of rolling back some operations. (For > example, the user was drawing a LineString on the LayerViewPanel, but > then decides to undo this action.) > > I believe that this code is using a boolean variable stored on the > Workbench's Blackboard object to indicate if a CursorTool is in the > process of doing this. Here are some of my questions: > > Would it ever be possible for there to be synchronization problems > with this variable? I suppose that could only happen if more than one > CursorTool is active at a time. Is that possible? > > Why would we ever need to check and see if a CursorTool was rolling > back some action? > > The Sunburned Surveyor > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel