Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Parameter Name Preference Setting Missing
Parameter Name Preference Setting Missing [message #954561] Tue, 23 October 2012 04:43
Michael Swiercz is currently offline Michael Swiercz
Messages: 2
Registered: October 2012
Junior Member
It seems that Papyrus' preference settings for Class Diagrams Operations only contains a subset of label attributes from those found under an operation's Appearance tab. Most notably are the absence for options to enable/disable Parameter Name and Return Type labels. A cursory review of other preference panels didn't come up with a solution either.

I am relatively new to Papyrus. Hopefully this is just a case of me not seeing the forest for the trees and that with time its various nuances and secrets will become more evident.

Unfortunately, I became quite unsettled when my Return Types weren't displayed anymore after twiddling with the preferences. The only recourse that seemed obvious at that time was to manual enable labels for each operation, which I didn't look forward to. Instead a little digging on my part uncovered where these preference are stored in hopes of setting global options once, even if not fully accessible via preferences.

Operation label display settings are stored in the following preference file
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse/papyrus.infra.gmfdiag.preferences.prefs

under the key
Operation.label.display


Note: this key may be not be defined if you have never tweaked your preference settings. The key is a 32-bit integer whose bit position definitions are as follows:

Bit   Label Display Options       Numeric
---   ------------------------   -------
  0   n/a                             1
  1   Visibility                      2
  2   n/a                             4
  3   Name                            8
  4   n/a                            16
  5   n/a                            32
  6   n/a                            64
  7   Modifiers                     128
  8   Parameter Type                256
  9   Return Type                   512
 10   n/a                          1024
 11   Parameter Direction          2048
 12   Parameter Name               4096
 13   n/a                          8192
 14   Parameter Multiplicity      16384
 15   Parameter Default Value     32768
 16   Parameter Modifiers         65536


For example, to globally enable operation display labels for Visibility (2) + Return Type (512) + Parameter Type (256) the options value would be 770 = 2 + 256 + 512. Adding/replacing

Operation.label.display=770

in the above mentioned preference file will set those global attributes accordingly. While this is not an elegant solution, it certainly is far more flexible than setting all my operation label options manually.

Hopefully, someone will point out an easier method for accomplishing the same.
Previous Topic:Transition from MicroFocus Together to Papyrus
Next Topic:Profile based on sysml metaclasses. Is it possible in Papyrus
Goto Forum:
  


Current Time: Thu Oct 23 11:59:09 GMT 2014

Powered by FUDForum. Page generated in 0.02307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software