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.


Topics - Geert Bellekens

Pages: 1 ... 12 13 [14] 15
196
Does anyone have ready made code to copy a sequence diagram?
From what I see now I'll have to:
  • copy owned elements (notes and fragments)
  • copy diagramObjects
  • copy messages
  • copy diagramLinks

Geert

197
I've added a feature to my free and open source add-in EA Navigator to select an element in the project browser based on its node path (FQN).

See http://geertbellekens.wordpress.com/2011/11/22/select-a-model-element-from-its-node-path-fqn-with-ea-navigator-1-3/ for more info or go directly to https://github.com/downloads/GeertBellekens/Enterprise-Architect-Toolpack/EANavigator_Setup_1.3.msi to download the msi setup file

Geert

198
Hi,

I have a Windows.Forms.RichTextBox in a control that I added as an add-in window in EA.
This all works nice untill I press the escape key. Then suddenly my RichTextBox doesn't accept enter or tab keys, and it doesn't launch the TextedChanged events anymore.
I've been trying to figure out what happens for a while now but I can't find anything.
I still receive all the key events for the enter key, the RichTextBox is not disabled or readonly, and it still has the focus?!?
Is EA doing something as a reaction to the escape key that somehow messes up my RichTextBox?
When running this RichTextBox in my own window I don't have any such problems.

Anyone an idea? I've also sent a bug report to Sparx.

Geert

199
Automation Interface, Add-Ins and Tools / Repository.CloseWindow?
« on: September 06, 2011, 10:40:46 pm »
Does anyone know if there's some kind of workaround to close the an add-in control window added by Repository.AddWindow()?

Geert

200
Hi,

I'm writing an add-in that inlcludes a control with a RichtTextBox in it to edit text.
To enable simple editing of the text I included code to use Ctrl-B for bold, Ctrl-I for italic and Ctrl-U for underline.
When I run this control in my own window then that works fine, but when I run it as the Add-In window in EA then it doesn't work.
For some reason EA seams to steal my Ctrl+key keypress, the only thing I get it the Ctrl keypress, not the Ctrl+B
Anyone know how to fix this? Here's my code:
Code: [Select]
/// <summary>
        /// fired when a key is pressed on one of the textboxes.
        /// Handles:
        /// - Ctrl-B -> Bold
        /// - Ctrl-U -> Underline
        /// - Ctrl-I -> Italic
        /// </summary>
        /// <param name="sender">the textbox firing the event</param>
        /// <param name="e">the arguments</param>
        private void textBox_KeyDown(object sender, KeyEventArgs  e)
        {
            //debug
            ACVModellingTools.Util.Logger.log("textBox_KeyDown info: Control = " + e.Control.ToString() + " keyCode =" + e.KeyCode.ToString() );

            RichTextBox textBox = sender as RichTextBox;
            // Bold = Ctrl-B
            if (e.Control && e.KeyCode == Keys.B)
            {
                this.toggleBold(textBox);
                e.SuppressKeyPress = true;
            }
            //Italic = Ctrl-I
            else if (e.Control && e.KeyCode == Keys.I)
            {
                this.toggleItalic(textBox);
                e.SuppressKeyPress = true;
            }
            //Underline = Ctrl-U
            else if (e.Control && e.KeyCode == Keys.U)
            {
                this.toggleUnderline(textBox);
                e.SuppressKeyPress = true;
            }
        }

Geert

201
Hi,

Does anyone have a working C# example of an add-in using the repository.AddWindow() functionality?
I'm having a bit of trouble getting the this functionality to work.

Geert

202
I've added a new feature to the EA Navigator to navigate to the implementation of an operation. It selects the Behavior element in the project browser and opens all diagrams owned by this behavior element.
More details on my blog
or download the EA Navigator 1.2 Windows Installer directly from github.

Geert

203
I've added a new feature to the free and open source addin EA Navigator 1.2. You can now navigate from operations to the CallOperationActions calling this operation.
More details on my blog
or download the EA Navigator 1.2 Windows Installer directly from github.

Geert


204
I'm writing a tool to move operations from one class to another.
The question: what is the best way to do this.
When using the API I can remove the operation from the source.Methods collection, and then add a new operation to the target.Methods collection, but then I need to copy each and every detail of the operation to the new operation (including parameters, tagged values, etc...).
What I really want to do is just overwrite the Method.ParentID with the ID of the target element.
Sadly this property is readonly :(

The more "dirty" way would be to change the parentID directly in the database. This would avoid the whole copy/paste stuff, and it would keep all references I've put into the model (because the id's would stay the same).

Do any of you see any problems with the "dirty" database approach?

Thanks

Geert

205
Hi,

I've published a blog post about creating MSI packages to install add-ins for EA.

Geert

206
Automation Interface, Add-Ins and Tools / The complete C# add-in template
« on: February 16, 2011, 06:36:03 pm »
Because I got sick and tired of having to go back and forth to the EA help file, and translate the events from VB to C# I created an abstract add-in class that already defines all events an add-in could possibly use.
I've also copy-pasted the documentation from the EA help file.

You can find more info about it on my blog, or download the whole Enterprise Architect Add-In Framework from GitHub

I of course hereby invite you all to contribute  :)

Geert

207
Automation Interface, Add-Ins and Tools / Open source EA add-ins and tools
« on: February 15, 2011, 07:02:12 pm »
I've just published most of my C# code on GitHub

There's:
More about this on my blog: http://geertbellekens.wordpress.com/2011/02/15/uml-and-enterprise-architect-tools-open-sourced-at-github/

Geert

208
Automation Interface, Add-Ins and Tools / Testing and Debugging C# add-in
« on: February 08, 2011, 03:50:14 pm »
I've developed a small tool to test and debug your add-ins without having to shut down EA for each build.
See my blog or the Sparx Community Site for more details.

Geert

210
I'm creating an addin to prevent accidental stereotype creation, and the moment the model is loaded I want to create a list of the defined stereotypes.
I thought it would be a good idea to put it in the event EA_OnPostInitialized because it says the model is fully loaded at that moment, but I get an error:
EA_OnPostInitialized: Call OpenFile() or OpenFile2() before accessing other Repository members.
So if I cant use the repository yet, whats the point of this event?
Here's the code I'm using on 8.0.862
Code: [Select]
       public void EA_OnPostInitialized(EA.Repository Repository)
        {
            //make sure the list is empty when connecting
            existingStereotypes = new Dictionary<string, EA.Stereotype>();
            foreach (EA.Stereotype stereotype in Repository.Stereotypes)
            {
                existingStereotypes.Add(stereotype.StereotypeGUID, stereotype);
            }
        }
Anyone who successfully used the EA_OnPostInitialized operation?

Geert

Pages: 1 ... 12 13 [14] 15