Ok my environment is:
1) OS: Windows XP ( It could depend by operating system )
Eclipse 3.3 Europa
org.eclipse.stp.bpmn.feature_0.7.0.200710080602-43-7777
2) To reproduce this i do the following step:
a) Create a bpmn diagram with the wizard
b) drop a workspace file into pool or activity ( it's the same )
c) close the diagram editor
If between a) and b) i select Annotaions in Property section i go
to the annotation i see
the property called genericFile:projectRelativePath i select with
the mouse the value i
simply confirm with Enter it works.
Please open a bug with this information.
>
> Is your class implementing IEAnnotationDecorator ? Did you have a
look
> at FileEannotationDecorator ?
Yes Antoine. I start coding my class looking at
FileEAnnotationDecorator. I change only the code that get my icon.
Strange. Can I have a screenshot of it ?
Sure i've attached a file with screenshot.
You changed the direction to SOUTH, and obviously, we have a bug there. I'll look at it. As a workaround, you can put the decoration somewhere else for now (you have the choice between EAST, WEST, NORTH, SOUTH and their composites: NORTH_EAST, etc).
Yes Antoine. I just have success in the drop operation that create my
annotation.
What i'm not able to do is to have the right context menu that call the
action to delete the annotation.
Ah ok. Sorry. You need to look at AbstractDeleteAnnotationAction and
its implementation DeleteFileLinkAction.
The tricky part is to declare it in the extension point. You'll need to
search plugin.xml and see how the DeleteFileLinkAction ID constant is
used there. GMF is a bit complex when it comes to popup contributions.
Ok i looked at the class you say me and plugin xml and i've implemented
my own but
it's not working.
Maybe there's an error. Here the section i try to add. Is anything
wrong?
<extension
point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders">
<contributionItemProvider
checkPluginLoaded="true"
class="org.eclipse.stp.bpmn.diagram.providers.BpmnDiagramActionProvider">
You need to implement your own action provider. Look at BpmnDiagramActionProvider and reimplement one.
<Priority name="Low">
</Priority>
<popupContribution
class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider">
<popupStructuredContributionCriteria objectCount="1"/>
<popupAction
id="deleteIntermediateModelAnnotationAction"
path="/editGroup"/>
</popupContribution>
</contributionItemProvider>
</extension>