Book a Demo

Author Topic: How to use EA as an OLE object?  (Read 5856 times)

mcinar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
How to use EA as an OLE object?
« on: February 16, 2012, 11:28:14 am »
Hi everyone,

I was trying to embed EA to a plugin as an OLE object.
I use this code to do so:

OleControlSite clientSite = new OleControlSite(frame, SWT.NONE, "EA.Project");

But no matter what I tried, especially for ProgramID part(right now "EA.Project") I could not get any graphical EA in my plugin. when I put "Word.document" or "Excel.Sheet" instead of "EA.Project" I see MS word or MS Excel application appears in my plugin, but not for EA. I found ProgramID of EA in regedit, I guess that was right but I could not be sure either if it was.

my whole code is this:

Display display = new Display ();
Shell shell = new Shell (display);
OleFrame frame = new OleFrame(shell, SWT.NONE);
frame.setBounds(0, 0, 400, 400);
OleControlSite clientSite = new OleControlSite(frame, SWT.NONE, "EABL.Model");

shell.setSize (400, 400);
shell.open ();

Does anybody worked with OLE integration before?
I greatly appreciate any help or comment.

Thank you,
Sincerely,

Murat.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to use EA as an OLE object?
« Reply #1 on: February 16, 2012, 05:17:14 pm »
Murat,

Are you sure this is supposed to work?
I've never seen any reference to something like this.

Geert

mcinar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: How to use EA as an OLE object?
« Reply #2 on: February 16, 2012, 05:51:09 pm »
Hi Geert,

after I found this web page, I thought it should work:

http://www.sparxsystems.com/enterprise_architect_user_guide/9.2/automation/theautomationinterface.html

am I wrong about the automation integration support?

As a beginning, what I want to do is exactly create a very simple plugin which runs EA in it (with graphical interaction), even though with an empty project..

And, the weird part is, when I do this and run it, my plugin does not show anything, but in the background, I can see EA runs, from my task manager, and when I exit from the plugin, EA terminates as supposed to be. so I think I am close to what I want, but I think I am missing a small detail in the options that I use.

By the way, with these options, it shows the whole menu bars and everything inside the plugin area, for example when I run it for word or excel, even for an empty document, I see all the menu bars, font & all that buttons etc.. but with EA, there is nothing, at least I expect to see the the menu bar and blank page of EA.

Any thoughts?

Thanks for your help and answers,
Sincerely,

Murat

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to use EA as an OLE object?
« Reply #3 on: February 16, 2012, 06:31:50 pm »
Murat,

There's nothing there that says you can run the EA as a plugin in another application.

You can create your own plugin into EA, but I don't think you can do it the other way round.

see here: http://geertbellekens.wordpress.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/ for more info on how to create add-ins.

Geert

mcinar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: How to use EA as an OLE object?
« Reply #4 on: February 17, 2012, 01:51:22 pm »
Or in any other way, is it possible to open EA as a plug-in tab in another application, for example eclipse?

For my class, I am trying to demonstrate that UML design is extensible and tools are compatible for implementation for many platforms including eclipse, but it doesn't have to be necessarily eclipse though, if I found a way to implement it for Netbeans or Visual Studio, that would be fine as well. API control to the opened file is not important for me at this point because what I am planning to do is just a demonstration, if I can show them EA visually there, that would be enough.

Thank you so much to everybody for your help,

Sincerely,

Murat

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to use EA as an OLE object?
« Reply #5 on: February 17, 2012, 06:25:26 pm »
Murat,

AFAIK there nothing in the EA API that could help you with that. So I guess EA behaves like any other application. If you manage to run any other application in your own window you should be able to do the same with EA.

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to use EA as an OLE object?
« Reply #6 on: February 20, 2012, 08:43:07 am »
Quote
Or in any other way, is it possible to open EA as a plug-in tab in another application, for example eclipse?
Have a look at the separate products:

MDG Integration for Eclipse

MDG Integration for Visual Studio

The Sparx Team
[email protected]