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 ... 11 12 [13] 14
181
Automation Interface, Add-Ins and Tools / get element from scenario
« on: April 06, 2012, 09:44:27 pm »
For some reason they "forgot" to add the elementID to the scenario class in the API.
So I had to make a workaround to get the actual element.
For anyone else trying to figure this out:
Code: [Select]
       public UMLUsecase useCase
        {
            get
            {
                string sqlQuery = @"select o.ea_guid as CLASSGUID, o.Object_Type as CLASSTYPE,o.Name from (t_object o
inner join t_objectscenarios os on os.Object_ID = o.Object_ID)
where os.ea_guid = '<Search Term>'";
                List<object> results = this.model.SearchSQL(sqlQuery,this.wrappedScenario.ScenarioGUID);
                if (results.Count > 0)
                {
                    return results[0] as UMLUsecase;
                }
                else
                {
                    return null;
                }

            }

        }

Geert

182
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

183
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

184
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

185
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

186
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

187
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

188
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

189
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


190
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

191
Hi,

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

Geert

192
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

193
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

194
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

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