..and a small addition to "[...]the main thread goes on and makes the
leftover 3 graph operations DIRECTLY on the graph."
Every of this 3 poerations is fired one by one to
IChangeEngineListener, however the Change-object contains the very
same 5 operations as before.

Thanks
Andriy





On 30 Nov., 19:36, Andriy Sokolov <[email protected]> wrote:
> Hello, TopBraid Suite team!
>
> After one half year of working on my project I have discovered that
> the ChangeEngine mechanism not working such, how I wanted to use it.
> The point is following: i have multiple changes in a batch, and i want
> they all to be handled atomically.
> Here is the execute()-method of the MyCommand (extends
> org.eclipse.gef.commands.Command):
>
> if (!TB.getSession().getChangeEngine().isBusy()){
>         IChange change = new AbstractChange(changeName) {
>                 @Override
>                 public void execute(ISession arg0, IProgressMonitor arg1)     
>   throws
> InterruptedException {
>                         //changes the graph: 4 operations
>                         child.setBounds(constraint);
>                 }
>         };
>         //request for execution
>         TB.getSession().getChangeEngine().execute(change);}
>
> else {
>         //changes the graph: 4 operations
>         child.setBounds(constraint);
>
> }
>
> So, when there are multiple such commands in a batch, the first of
> them creates an IChange (Change A) and an execution will be requested.
> When the second command runs, the direct change (Change B) should be
> performed.
> But!
> From 4 operations of Change B the FIRST operation is fired by jena's
> GraphMemBulkUpdateHandler to the GraphTracker, which to
> TBCChangeEngine, which to PropertiesTreeView, and PropertiesTreeView
> makes the main threed asleep and runs the parallel thread with
> TBCChangeEngine, where Change A is executed. After that
> TBCChangeEngine fires changes to my IChangeEngineListener, and I see
> there Change X = Change A + the first operation of Change B (5
> operations). Then after this thread has finished, the main thread goes
> on and makes the leftover 3 ograph operations DIRECTLY on the graph.
>
> Therefore the undo/redo is not working and the graphics is 'blinking'
> because of multiple updates insteed of only one.
>
> I hope you can follow my explanations..Please tell me, how can I fix
> this behaviour?
>
> Best regards
> Andriy

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to