Bug 396619 - [DI] Explicilty turn on tracking for CIF#invoke
Summary: [DI] Explicilty turn on tracking for CIF#invoke
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.3   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-14 09:51 EST by Thomas Schindl CLA
Modified: 2018-03-19 08:27 EDT (History)
4 users (show)

See Also:


Attachments
patch (15.37 KB, patch)
2012-12-14 10:00 EST, Thomas Schindl CLA
no flags Details | Diff
another try (22.81 KB, text/plain)
2012-12-20 11:31 EST, Thomas Schindl CLA
no flags Details
New JUnit-Test (2.23 KB, patch)
2012-12-20 11:36 EST, Thomas Schindl CLA
no flags Details | Diff
New Test (2.71 KB, text/plain)
2012-12-20 11:47 EST, Thomas Schindl CLA
no flags Details
Improved diagnose (3.21 KB, text/plain)
2012-12-20 12:14 EST, Thomas Schindl CLA
no flags Details
Approach to RaT ExtendedObjectSupplier (36.01 KB, patch)
2012-12-20 18:40 EST, Thomas Schindl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2012-12-14 09:51:45 EST
In bug 387299 in requested to make RAT also take into consideration when we do a CIF#invoke which Oleg closed because this would change the behior of invoke which is not desired.

To fix our timerExec problem I'd like to propose 3 new invoke-methods who explicitly turn on tracking so the API user decides whether he wants to track accesses or now.

patch with implementation and test case to follow
Comment 1 Thomas Schindl CLA 2012-12-14 10:00:34 EST
Created attachment 224738 [details]
patch
Comment 2 Paul Webster CLA 2012-12-14 11:05:44 EST
Tom, could we just include the last public method, and allow passing in null for the static context and null for the default return value?  Is that not what the other 2 methods resolve to?

PW
Comment 3 Thomas Schindl CLA 2012-12-14 11:21:10 EST
Yes but I thought it would not harm to provide all 3 variations like we have on simple invoke but if this is the only problem I've no problem removing them.
Comment 4 Thomas Schindl CLA 2012-12-20 10:39:20 EST
Unfortunately this patch is completely wrong :-( we are only going through the RAT on leaf change but the other reinjections are done through method-requestor reinjection
Comment 5 Thomas Schindl CLA 2012-12-20 11:31:40 EST
Created attachment 224960 [details]
another try

This patch follows another route - it disables the pausing so the RAT recording the changes and on change we rerun the RAT.

The test checks that and it recreates the RAT on the activeChild so we have no effectivly 2 RATs
Comment 6 Thomas Schindl CLA 2012-12-20 11:36:48 EST
Created attachment 224961 [details]
New JUnit-Test
Comment 7 Thomas Schindl CLA 2012-12-20 11:45:00 EST
Comment on attachment 224961 [details]
New JUnit-Test

have to correct myself - the RAT-RAT is needed, else we'll get update requests when changes are made e.g. to an inactive child!
Comment 8 Thomas Schindl CLA 2012-12-20 11:47:29 EST
Created attachment 224962 [details]
New Test

Improved test with some error output - there still seems to be a problem which happens when we activate/deactivate branches where we get 2 requests instead of only 1
Comment 9 Thomas Schindl CLA 2012-12-20 11:52:41 EST
I think the reason why this is arbitary is which modification in the map is executed earlier.
Comment 10 Thomas Schindl CLA 2012-12-20 12:14:12 EST
Created attachment 224967 [details]
Improved diagnose

Fixed test implementation which only invoked once
Comment 11 Thomas Schindl CLA 2012-12-20 12:27:46 EST
The last problem is that RAT is not able to track ExtendedObjectSuppliers need to take a look into them need to see how I can make get them into RAT
Comment 12 Thomas Schindl CLA 2012-12-20 18:40:12 EST
Created attachment 224975 [details]
Approach to RaT ExtendedObjectSupplier

Unfortunately ExtendedObjectSuppliers do not take part in change computations like values in the PrimaryObjectSupplier do. I've experimented with the approach to pass on the RaT to invokeAndTrack and make the ExtendedObjectSupplier directly calling back to it when a value changes.

As an example I implemented the PreferenceObjectSupplier to make use of the new API. 

I really have no better idea for ExtendedObjectSupplier and RaT. We could decide that we are not providing reinjection support for @Preference and @EventTopic but I don't really think this is an option, right?
Comment 13 Paul Webster CLA 2013-03-07 12:55:12 EST
Tom, I've turned your last patch into a Gerrit patch set, https://git.eclipse.org/r/#/c/10943/

I'd like to review this for M6 (Tomorrow and Monday) to see if we can get this in and remove the timer in Kepler.

PW
Comment 14 Paul Webster CLA 2013-04-29 09:49:53 EDT
(In reply to comment #5)
> Created attachment 224960 [details]
> another try

Tom, was this in good shape except for the fact it didn't deal with ExtendedObjectSuppliers?

PW
Comment 15 Thomas Schindl CLA 2013-04-29 09:55:12 EDT
(In reply to comment #14)
> (In reply to comment #5)
> > Created attachment 224960 [details]
> > another try
> 
> Tom, was this in good shape except for the fact it didn't deal with
> ExtendedObjectSuppliers?
> 
> PW

Yes
Comment 16 Paul Webster CLA 2013-04-29 10:32:42 EDT
I'm going to work from patch set 7, see how far I get.

PW
Comment 17 Paul Webster CLA 2013-04-29 12:21:17 EDT
Working with  attachment 224960 [details] it can track arguments in invokeAndTrack calls.  But because of how most of the client code is structured it doesn't appear to keep most tool items up to date.


PW
Comment 18 Lars Vogel CLA 2018-03-19 08:27:58 EDT
Please reopen if that is still relevant.