Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Extending the properties view
Extending the properties view [message #962694] Mon, 29 October 2012 04:57 Go to next message
Goood Guy is currently offline Goood Guy
Messages: 124
Registered: September 2011
Senior Member

I would like to create an own tab in the properties view for my application.
In particular, this tab gets activated, when the user selects a Transition from a ProtocolStateMachine or a Message in a Sequence Diagram. The tab has a widget that shows a list of available operations from a certain interface. When the user selects an operation, all elements that are necessary are created at once (trigger, event, etc.)

After some time I finally found out, that the properties view is managed by resp. (very cool thing btw). Is there some documentation about how to use it?

I tried to create such a property model via the "Property view configuration" in the Papyrus New Wizard. What do I have to select for the source? The UML.ecore? Where do I find the right one? What do I have to select for the target? A new .ctx file?

I guess this generation process is to generate the Data Contexts so that Attributes and References from the Ecore model can be referenced.

I assume that the .ctx model is partitioned into the .xwt files. This means, when you create a widget model element, it isn't stored in the .ctx but in the .xwt. Is that correct?

I guess for my intention, there exists no predefined adequate widget. How can I create and include my self-made widget?


Re: Extending the properties view [message #986556 is a reply to message #962694] Tue, 20 November 2012 17:25 Go to previous messageGo to next message
Goood Guy is currently offline Goood Guy
Messages: 124
Registered: September 2011
Senior Member
for those who are interested, this is how it works:

  • in the properties view, click on "view menu" > "customize property view"
  • select "UML (Read-only)" and hit "copy". Name the customization as you like e.g. "Custom"
  • go to workspace\.metadata\.plugins\\CUSTOM and copy its content to the plugin you want to deploy.
  • open the CUSTOM.ctx and rename the UML tab and provide a new ID for it.
  • delete the profile tab and all views you do not want to contribute to. Keep all data contexts intact and fix the broken reference from the view to the section you want to contribute to manually. validate the context model.
  • in your plugin.xml add an extension for
  • create a new custom widget, i.e. a java class that inherits from In its constructor, call super.setEditor(editor) where editor is an instance of a class that inherits e.g. from org.eclipse.papyrus.infra.widgets.editors.AbstractListEditor
  • go to the ui-folder and open the xwt-file for the view you want to contribute to. Add a new namespace to the file, that is the package that contains your widget java class.

<extension point="">
      <context contextModel="properties/CUSTOM.ctx">

<?xml version="1.0" encoding="UTF-8"?>
<Composite xmlns=""
	xmlns:x="" xmlns:ppe=""
	<custom:OperationForTransitionSelector input="{Binding}"

Re: Extending the properties view [message #1016030 is a reply to message #986556] Mon, 04 March 2013 11:17 Go to previous messageGo to next message
Martin Jonsson is currently offline Martin Jonsson
Messages: 3
Registered: March 2013
Junior Member
Hello Simon.

I might be completely stupid but I don't seem to find the "view menu" setting in the property view. I guess I'm looking in the wrong place.

Could you please elaborate a bit on that step?

Thanks a ton!
Re: Extending the properties view [message #1016660 is a reply to message #1016030] Thu, 07 March 2013 04:47 Go to previous message
Camille Letavernier is currently offline Camille Letavernier
Messages: 399
Registered: February 2011
Senior Member
Hello Martin,

The "View menu" is the white arrow on the top-right corner of the properties view

Previous Topic:Problem of reverse engineering with Modisco & Papyrus
Next Topic:How to import a RegisteredLibrary using the method getRegisteredLibraries ()
Goto Forum:

Current Time: Thu Apr 17 05:37:33 EDT 2014

Powered by FUDForum. Page generated in 0.01856 seconds