[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Re: how do I implement this case?

Did you look at MindmapCreateSubtopicAction - custom created action in 
mindmap example?
These lines may help you:
CreateViewAndOptionallyElementCommand createOtherEndCmd = new 
CreateViewAndOptionallyElementCommand(

endAdapter, map, request.getLocation(), selectedElement

.getDiagramPreferencesHint());

cc.add(new ICommandProxy(createOtherEndCmd));

ICommand connectionCommand = new 
DeferredCreateConnectionViewAndElementCommand(

request, connectionAdapter, request.getSourceEditPart(),

createOtherEndCmd.getResult(), selectedElement.getViewer());

"Benjamin Fu" <benjamin_fu@xxxxxxx> wrote in message 
news:e9cpqe$ge5$1@xxxxxxxxxxxxxxxxxxxx
> hi, all,
> Here is a case makes me headachy for days:
> I want to create a element together with a gmf runtime Note and a link 
> between my element and the Note, I have found there is AddNoteAction that 
> do the similar work, but before call AddNoteAction the element which want 
> to be added with Note must be exist already. My case is how to create my 
> element, the Note and the link together?
>
> br,
> ben
>