Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mcinar

Pages: [1]
1
Quote
I've added a working example of this to my example add-in at
https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework

Geert

Thanks a lot, I appreciate.

2
Hi all,

I am having a problem about adding a add-in window to Enterprise Architect.
First of all, I am using Visual Studio 2010 and C# as the language.
 I just followed the code in the following link:
http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/creatingacustomview.htm

but the only problem is, I don't understand how I am going to use UserControl1.
So, "  UserControl1 m_MyControl;" I could not created an instance of Usercontrol to hold the pointer of the addWindow, to manipulate it.

Actually, I tried to create an ActiveX custom control object, but it seems so complicated that I tried many many times but none of them ended up with something works.

At this point I really appreciate any help that might give me a clue to where to start. I only need to create the object to hold the pointer of addWindow() and manipulate it as I need.

I even created some simple class, and registered it's .dll file with regasm.exe to the registry, but I am still not able to create an instance of the class that I registered, in my code.

I dont know if I need to add some "using" clause?

I appreciate your help.
Thanks,

Murat.

3
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

4
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

5
Automation Interface, Add-Ins and Tools / 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.

6
Hi all,

I am designing a plug-in for a development environment such as Eclipse, Netbeans or Visual Studio. And my first purpose is to be able to open a UML diagram in any of these development environments, probably using a   library of EA, if there are any for this specific purpose.
Please let me know if anybody has tried and succeeded this before.

Thank you,
Sincerely,

Murat Cinar.

7
So, I think it is not possible to show any active EA element inside add-in window or add-in tab, is that right?

I am writing in C# and since multiple inheritance is not supported by C#, I cannot extend UserControl and EA.AddinFramework at the same time so that's why I can only pass universal types such as string, or image(png) to the controller class which draws whatever is passed to it to the add-in window/tab.

Now, I am created some diagram and element inside my code, so these objects are created automatically prior to a specific event, and I activate my diagram so it is appearing as a tab, and it is active, so I can drag and drop any item to it.

But, I would like some specific items to be there when the creation code ran. So, does anyone knows how to place an element inside of a diagram physically? ( I am guessing I need to provide some kind of position parameters where will be the element placed)

I would appreciate any help.

Thanks.
Murat.  

8
Quote
If I wanted to show the image of a class (for example) in my own control I would:
Create a dummy diagram.
Set the properties how I want.
Add the object to the diagram.
Save the diagram to a bitmap.
Delete the diagram.

Along with caching the images as necessary.

Other than this solution, is it possible to show actual items in add-in windows or add-in tabs?

I talked to my colleagues and they want it to be active rather than passive, so; user would be able to make changes to a view by just interacting with the add-in.

But since C# is not supporting multiple inheritance, I cannot extend EA Framework and UserControl at the same time, and as an artifact of this, my Drawer class does not know about EA architecture stuff (repository, diagrams, elements etc..) it only knows windows kind of elements because it is extending UserControl.

At this point, I am only focused to create a new tab( which I am able to do) and trying to fill it with existing elements from other tabs, or just see if I can put any kind of EA elements in it just like other tabs has, but I could not succeeded yet.

If anyone has any kind of a solution to this problem, I would really appreciate.

Thanks a lot to everyone.

9
Quote
Murat,

You can show an image of a diagram in a your own window, but I don't think you can re-use the actual EA graphical elements.

Geert
First of all, thank you very much for all of your help.

A this point, I implemented the template you provided and I think I got the logic underneath somehow. As far as I understand, the key thing is, MyAddinClass only knows about EA stuff such as repository and etc.. and MyEAControl knows about windows drawing stuff, since it is being extended from UserControl.

It is considerably reasonable to pass a string between these two classes because both of them knows string, but in my case, when I tried to put the exact content of an existing tab, I think MyEAControl will not understand the type that I will send, is that right? and is the solution for this problem is, extending both UserControl and EA_AddinFramework ? (interopEA.dll)

and aslo I think in the designer class, I need to put something else to display a "chart" instead of string, I'll try to figure it out tomorrow when I got to work.

And if you have any clue, or help that you can give me, I would really appreciate.

Thank you again,

Murat.

10
Hi,

I need to duplicate one of the tabs inside of my add-in window. So, instead of writing guid, or any text there, I would like to show visual content belong to EA.

I think I need to write a function inside Controller class, which extends UserControl, The function should probably be like named as Display(){} and it should take repository as an argument, and/or some EA type of diagram or element to show, but even after that I dont have any idea how to visualize that kind of objects in a new add-in window, or a new add-in tab.

I need some ideas to give me some clues to how to start.

I would appreciate if you can help me,
Thanks,

Murat.

Pages: [1]