| Summary: | Tooltip for connection labels not updated after custom command execution | ||
|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Henrik Rentz-Reichert <hrr> |
| Component: | Core | Assignee: | Project Inbox <graphiti-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.gorning, michael.wenz, tim.kaiser |
| Version: | 0.8.0 | Flags: | matthias.gorning:
indigo+
|
| Target Milestone: | 0.8.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | Indigo RC3 theme_bugs | ||
| Bug Depends on: | |||
| Bug Blocks: | 342216 | ||
|
Description
Henrik Rentz-Reichert
I need more information to produce this error: * What do you mean with a custom command? A custom feature? * Is the changed model object linked with the connection and/or the connection decorator? * Does the model change influence the decorator's label? (In reply to comment #1) > I need more information to produce this error: > > * What do you mean with a custom command? A custom feature? yes, a org.eclipse.graphiti.features.custom.AbstractCustomFeature > * Is the changed model object linked with the connection and/or the connection > decorator? the changed object is a nested object of the linked object > * Does the model change influence the decorator's label? the label is always re-computed and updated. It seems though that the tooltip is updated if and only if the label text has actually changed. I can give you further details if needed. I have two further questions: * Is your domain model in EMF? * Is your decorator an active decorator? (In reply to comment #3) > I have two further questions: > > * Is your domain model in EMF? yes > * Is your decorator an active decorator? yes You can find the relevant code in file http://git.eclipse.org/c/etrice/org.eclipse.etrice.git/tree/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/TransitionSupport.java line 266ff Currently I am not able to reproduce this error. I've made some tests with internal test tools and I've also spent some to inspect our code, but I could not find any problem with the tooltip refresh. I've found out that there is a special refresh handling for active connection decorators. It does not matter whether the whole diagram or only parts of the diagram will be refreshed. In each case all the existing active connection decorators will be refreshed. And at the end of each refresh we will ask the toolbehaviour provider for the tooltip. Your code in TransitionSupport.java also looks well. We saw that you have several providers. Perhaps we asked the wrong provider for the tooltip? For verification you should set a breakpoint in the class PictogramElementDelegate at the end of the method refreshFigureForGraphicsAlgorithm where the line starts with final String toolTip = toolBehaviorProvider.getToolTip(graphicsAlgorithm); Matthias, I observe that in org.eclipse.graphiti.ui.internal.editor.DiagramChangeListener.resourceSetChanged(ResourceSetChangeEvent) I get notifications after the command is executed. In the case where the tooltip update works the Text of the Decorator changed and isRelevant is found to be true. In the case where it doesn't work only notifications containing EObjects from my business model are received. In this case isRelevant always is false. If the update is triggered only if Graphiti objects have changed: boolean isRelevant = isGraphitiMmObject(eClass) || superClassIsGraphitiMmObject(eClass); then pure business model changes can never be reflected. Or are there other paths which lead to a refresh of the tool tips? For changes in the business model there is a DomainModelChangeListener. Did you set the breakpoint as proposed? (In reply to comment #7) > For changes in the business model there is a DomainModelChangeListener. > > Did you set the breakpoint as proposed? yes, I did. But it is not hit. That's why I tried to investigate how it is supposed to work. I checked what the DomainModelChangeListener does. It seems to me that affected pictogram elements are computed and then the update feature is invoked. But my update feature returns false if asked whether an update is needed. I thought the tooltip is handled by the behavior provider?? On the other hand I couldn't find on which path the breakpoint could be reached. At some point along this path something must fail. Or do I have to handle the tooltip also by the update feature? And how can I access it? Since there is no change in the domain model which leads to a diagram refresh the tooltips must be refreshed manually. There is a new method refresh(PictogramElement pe) in IDiagramEditor which can be used. You can simply call this method e.g. with ConnectionDecorator's. BR, Matthias Part of Graphiti Indigo 0.8.0 |