Author Topic: Drag/drop and Add-ins  (Read 6362 times)

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Drag/drop and Add-ins
« on: February 06, 2010, 05:25:46 am »
I'm writing an Add-in which needs to drag items from the Project Browser into a treeview control, which is inside a custom control.
I've enabled the control for drag/drop, but none of the dragover etc events fire. All I get is the 'there is no current diagram to perform this operation...' message from EA.
Does anyone have some example code for making d/d work in this context ?
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Drag/drop and Add-ins
« Reply #1 on: February 06, 2010, 06:11:34 am »
I would be very interested in seeing this myself, since I'm working on an add-in with a custom control parked in an EA tab that has a tree view as well... right now I'm adding nodes to the tree (requirement elements and packages) using toolbar and context menu event handlers; drag-and-drop from the Project Browser would be even better.

BTW, the context menu/toolbar/menu bar approach is an alternative to drag-'n-drop if it turns out d&d isn't supported. There isn't an EA automation interface broadcast event AFAIK for custom tab controls. Sparx should consider adding this along the lines of the VBA "MarkerEvent" in Office apps, which allows otherwise invisible events to be passed up to an add-in.

Fred W
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Drag/drop and Add-ins
« Reply #2 on: February 06, 2010, 06:35:07 am »
Feature request sent!
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


fwoolz

  • EA User
  • **
  • Posts: 435
  • Karma: +0/-0
  • We have met the enemy, and he is us.<Pogo, 1970>
    • View Profile
Re: Drag/drop and Add-ins
« Reply #3 on: February 06, 2010, 06:42:59 am »
BTW - EA does have a pair of broadcast events - EA_OnOutputItemClicked/ DoubleClicked that fire in response to clicks on a custom view, but no generic "OnOutputItemEvent" that could, conceivably, respond to arbitrary tab events.

Fred W
Fred Woolsey
Interfleet Technology Inc.

Always be ready to laugh at yourself; that way, you beat everyone else to the punch.


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Drag/drop and Add-ins
« Reply #4 on: February 08, 2010, 07:15:08 pm »
Ian, Fred,

I think the new EA version 8 might be of interest to you.
They have added some new events, and a new addin docked window feature.

Geert

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: Drag/drop and Add-ins
« Reply #5 on: August 29, 2012, 06:48:35 am »
in the custom window (c# usercontrol) the drag & drop events doesnt fire as well. At least i cant get it to work.
Any one has experiences with that?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Drag/drop and Add-ins
« Reply #6 on: August 29, 2012, 04:39:04 pm »
No, I haven't tried it yet, but I was planning to in the future.
Have you asked Sparx support yet?

Geert

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: Drag/drop and Add-ins
« Reply #7 on: August 29, 2012, 06:18:05 pm »
Yes -I have some experience of it. Nothing good. I have asked Sparx for drag/drop support through as many channels as possible, but interestingly, no response.
If any Spaxians are listening-in, this really would be of huge benefit to add-in/extension writers: users expect drag/drop because of their experiences in all other UIs they use, so when an EA add-in arrives without d/d, our stuff looks a bit lame.
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com