You are here: User Customizations > Creating Plug-Ins for Innovator > Tool and Document Windows > Refresh Windows

Refresh Windows

Other windows need to be informed if model element properties are modified in a window so that they can adapt their contents accordingly.

Context

Most windows do not merely show model elements; they also enable their changes. These changes normally affect both the window which the change was made in and the other windows as well. e.g. if the name of an open diagram is changed in the model tree, the text in the diagram's tab and the name field in the Properties area also need to be modified. This means that the window which changes to model elements were made in needs to inform the other windows about the action. The Refresh message can be used for this.

WindowMessageType.Refresh

A Refresh message contains data of the RefreshWindowMessage type. The data contains information about the type of refresh.

Mode Triggering Action ElSet
Command The Reload Contents command was triggered. Empty set
Content1

Old window contents was made visible.

Empty set
Add Model elements were created or added. Created elements
AddDiagramGraphic Model elements were added to a diagram. Added elements
Delete2 Model elements were deleted. Deleted elements
ChangeName Changes to a name Element affected
ChangeStereotype Changes to stereotypes Elements affected
ChangeStereoM2Attribute Changes to properties Elements affected
ChangeStereoProperty Changes to stereotype properties Elements affected
ChangeLabel Changes to labels Elements affected
ChangeSpecification Changes to specification texts Element affected
ChangePicture Changes to an assigned picture Element affected
ChangeOrder Changes to the order of assigned elements Element affected
ChangeImportedProfiles Changes to imported profiles for packages Packages affected
ChangeAccess Changes to access rights Elements affected
ChangeLock Changes to locking state

Elements affected; empty set when unlocking all elements

 

1 A tool window does not get any Refresh messages if it is not visible. A flag saying that the window was not refreshed and that its contents is probably old is set instead. If the window is activated, a Refresh message with the Content mode is triggered. The tool window should then fully refresh its contents.

2 For RefreshMode.Delete mode please note that the deleted elements may be in the message's information but these are already deleted and no longer valid. No properties of these elements can be accessed. The element set can only be used to e.g. search for the elements affected in the window to decide whether the window is affected by the delete action.

Note:

See the MID.Innovator.Plugin.Sample.RefreshMessage sample for editing the Refresh message.

Attention:

Server performance may be drastically reduced if you wrongly process Refresh messages. Please make sure you read the information in the Performance section.

RefreshModel Methods

You need to send Refresh messages to other windows if you make changes to model elements. Element modification is therefore normally carried out as follows:

Note:

See the MID.Innovator.Plugin.Sample.RefreshModel sample for sending the Refresh message.

 

 

© 1986-2014 MID GmbH Nuremberg Germany. DIN EN 9001 certified. All rights reserved.