| Summary: | [ui] callin marker creator fires too many jobs | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||||
| Component: | OTDT | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | ||||||||
| Version: | 0.7 | ||||||||
| Target Milestone: | 0.7 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Stephan Herrmann
Created attachment 172268 [details]
implementation
The patch fixes the immediate issue:
- invalidate each role at most once
- use 'baseMemberAdded' only if #members < 3 (per type)
otherwise call invalidateBaseCU(..) regarding the enclosing compilation unit
- when invoking invalidateBase(..) for the current editor input,
trigger a full updateCallinMarkers(ResourceMarkable,..)
Also included:
- don't synchronize CallinMarkerRemover,
saw a deadlock where multiple threads were processing JavaElementDelats.
Deadlock is worse than markers removed at a wrong point in time.
- make MethodMapping.findMethod(..) smarter so it finds callout-methods, too.
(needed for callin/callout-markers at base-level callouts).
- 'CallinMarkerCreator2.getAllMethodsAndFields(..)': find callout-methods, too
Not working currently:
- adding a method to a role-and-base does is not reflected in the deltas
- arbitrary change in a role creates ADDED deltas for all method mappings
Patch has been committed as r519, r520. (In reply to comment #1) > Not working currently: > - adding a method to a role-and-base does is not reflected in the deltas > - arbitrary change in a role creates ADDED deltas for all method mappings Following up on these in bug 317358. With this patch markers in binary base class are not removed if a callin is removed. CallinMarkerCreator2.invalidateBase(IJavaElement) must also look for a CLASS_FILE parent. Created attachment 172276 [details] Additional fixes (In reply to comment #4) > With this patch markers in binary base class are not removed if a callin is > removed. CallinMarkerCreator2.invalidateBase(IJavaElement) must also look > for a CLASS_FILE parent. Fixed by - symmetrically implementing invalidateBaseMarkable (was invalidateBaseCU) for Resources and JavaElements - implementing removal of JavaElement-based markers (as a FIXME actually) This solution is backed by the following cleanup: - use more explicit type IClassFile for element of JavaElementMarkable (we only use IResource or IClassFile as toplevel elements!) Verified using build 201007050931. |