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 - stao

Pages: [1] 2 3 ... 10
1
General Board / Re: change default values
« on: May 10, 2011, 11:12:09 pm »
sorry for digging old threads but that is exactly what i need
with the difference that i want to do this "template package" thing codewise.
i have written an addin with an uml profile and some stereotypes.
on creating attributes to a specific stereotype the default scope of the attribute should be always "public".
any idea how to do that?

2
Uml Process / Re: Icon attribute for stereotype in a profile
« on: September 16, 2010, 05:59:53 pm »
Works but the icon is only displayed if the .eap file is closed and reopened
or the properties of the element with the custom icon is opened and closed. ( the element is added via code )

i tried refresh and update on the element but nothing happens.
if the element is dragged from the toolbox the icon is displayed correctly.
Is there any way to refresh the project browser oder whatever is needed to show the icon correctly?

Stao

3
Uml Process / Re: Icon attribute for stereotype in a profile
« on: September 16, 2010, 08:53:45 am »
same issue here.

new icon only appears in the toolbox not in the project browser.

4
Since EA 12 i always get a generic OutOfMemoryError when trying to debug my addin with Visual Studio 2013.
The error appears right after the EA starting icon shows up.
Never had a similar problem with older EA versions.

Is this bug known?
What can i do about it?




5
I think you have to do it by yourself.

Do a database query on t_diagramobject and find an element whose bounds are contained by another element on the same diagram.

6
 not possible afaik  :(

7
Automation Interface, Add-Ins and Tools / Re: debugging addins
« on: February 08, 2014, 01:11:36 am »
For VS2010 i have to do the following:

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1295872058/8#8

Quote
I had a similar problem, but it boils down to the fact that if you start the EXE at debug time, VS2010 doesn't know what debugger to use, and it picks the wrong one!

To fix this, create an EA.exe.config file in the same location as EA.exe with this content:

<?xml version ="1.0"?>
<configuration>
 <startup>
   <supportedRuntime version="v2.0.50727" />
 </startup>
</configuration>


Now the start external program way of debugging works again.

~ Colin

8
Quote
Want help with this qwerty - but could be a useful tip for your shapescript book - when i was trying to get to grips with shapescripts - i started a new project then imported the BPMN MDG. This gave my access to the scripts via Setting->UML Types-Stereotypes. So i could for example view the shapescript for Pools/Lanes/Actiivties etc to figure out how things worked and of course copy and paste sections of a script into a new stereotype/script easily...

Regards,

Jon.


Hi Jon,

how do you import the BPMN Mdg Tech.?

Neither Extensions/Import/Other Tools nor Tools/MDG Technology Import does the trick for me. I tried it with the File C:\Program Files (x86)\Sparx Systems\EA\MDGTechnologies\BPMN 2.0 Technology.xml

What am i doing wrong?


9
Hi all.

per default new tabs are docked like diagrams but can be moved freely.

Is there a possibility to set the default docking status of the newly created tab window?
Or move the tab window to another position after it has been created.

Where does EA store the information which tabs are shown and where?






10
EA has a broadcast method where you can install your mdg technology file.

here our code:

Code: [Select]
public String EA_OnInitializeTechnologies(EA.Repository Repository)
        {
            string technology = "";
            Assembly assem = this.GetType().Assembly;
            using (Stream stream = assem.GetManifestResourceStream("PathToMDGTechFile.xml"))
            {
                try
                {
                    using (StreamReader reader = new StreamReader(stream))
                    {
                        technology = reader.ReadToEnd();
                    }
                }
                catch
                {
                    System.Windows.Forms.MessageBox.Show("Error Initializing Technology");
                }
            }

            return technology;
        }

11
you can use this method to extract your needed results from your sql result string:

Code: [Select]
public static List<String> getSQLContent(String queryResult, String nodeName)
        {
            String startTag = "<" + nodeName + ">";
            String endTag = "</" + nodeName + ">";

            List<String> returnVal = new List<string>();

            
            string[] splitted = queryString.Split(new String[] { startTag }, StringSplitOptions.RemoveEmptyEntries);

            returnVal.AddRange(splitted);

            if (returnVal.Count > 0 && !queryString.StartsWith(startTag) )
            {
                returnVal.RemoveAt(0);          
            }

            for(int i = 0; i < returnVal.Count; i++)
            {
                returnVal[i] = returnVal[i].Split(new String[] { endTag }, StringSplitOptions.RemoveEmptyEntries)[0];
            }

            if (returnVal.Count == 0)
            {
                returnVal.Add("");
            }
            return returnVal;
        }

you must be aware that the returned List size is never 0 (contains "" as a single entry if wanted result was not found in the string).
This has a reason in our Addin i cant remember right now  ::)

12
Automation Interface, Add-Ins and Tools / Re: How to use the addin window
« on: September 06, 2013, 07:12:56 am »
Hi Helmut,

you can add your own C# UserControl(s) to the addin window(s)

e.g.
Code: [Select]
if (globalFunctions == null)
                globalFunctions = Repository.AddWindow("eMoflon Global Functions", "EAEcoreAddin.ControlPanel.GlobalFunctions") as GlobalFunctions;

....

public partial class GlobalFunctions : UserControl

//here you can add TextFields, Buttons or whatever



stao

13
Quote
My first question is, how unique is the GUID that no ID will appear twice or more, or how high is the probability of a same double GUID?

LMGTFY

http://en.wikipedia.org/wiki/Globally_unique_identifier

as you can see there is a neglectable chance of two same GUIDs

14
Quote
So what I need to do is to implement for each stereotype a class which extends MocaSerializableElement  and implements serializeToMocaTree , right?

exactly.

but keep in mind: if you want to have additional features which our MocaTree -> Ecore transformation doesn't provide it becomes a bit problematically.

I don't see how your Class in Class diagrams fit to Ecore.

You can handle your additional features in java in eclipse.

15
Hi André

i would say that depends highly on your EA diagrams. If they are similar to the Ecore structure it would be relatively easy.
If you dont need to store additional data inside of EA it gets even more easy.

I try to make an example:

You have created a stereotyped (from your UML profile) class called myClass1.

This type of class should be exported as an EClass.

You implement an EClass.cs file in your Addin which extends the class
MocaTaggableElement (if you want to store data in EA) or MocaSerializableElement (if you only want to serialize during export)
(Both classes are somehow explained at https://code.google.com/p/ea-serialization-to-tree/)

You implement the serializeToMocaTree method of your new c# class.
You have to build the same tree we use.

During export you iterate over your EA Model and on every occurrence of your stereotyped class you will create an Object of EClass.cs,
call the serializeToMocaTree method and add this tree on your parent tree (which should be the tree of an EPackage)

After that you have a complete moca tree which will be transformed
to Ecore by our Eclipse plugin.


A disadvantage is that you have to build up the same structure we do and your code (especially in eclipse) will be dependent on our plugin.

From my point of view i would say that its worth a try.
You can start simple with a single EPackage.cs, implement the needed method and see how far you can get.







Pages: [1] 2 3 ... 10