Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Preference page of properties view
Preference page of properties view [message #1080834] Tue, 06 August 2013 12:34 Go to next message
JIAN SHEN is currently offline JIAN SHENFriend
Messages: 8
Registered: June 2013
Junior Member
Hi,

I'd like to customize the properties view of Papyrus (remove some options) and I have succeeded in following with this page: http://www.eclipse.org/forums/index.php/t/419427/

Now I can realize my customization by choosing to disable the original UML context in the preference page of properties view, my problem is how can I realize this operation programmatically?

I found the class Preference in org.eclipse.papyrus.views.properties.preferences, I think it to be able to control our preference page, but I'm not sure, does anyone have some experience with this?

Thank you!

Re: Preference page of properties view [message #1080953 is a reply to message #1080834] Tue, 06 August 2013 15:47 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

See the following method:

org.eclipse.papyrus.views.properties.runtime.ConfigurationManager.disableContext(Context, boolean)


Regards,
Camille


Camille Letavernier
Re: Preference page of properties view [message #1080954 is a reply to message #1080834] Tue, 06 August 2013 15:48 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi,

The org.eclipse.papyrus.views.properties.runtime.ConfigurationManager
class provides API for manipulation of the registration and enablement
of Properties view customizations.

HTH,

Christian


On 2013-08-06 15:07:56 +0000, JIAN SHEN said:

> Hi,
>
> I'd like to customize the properties view of Papyrus (remove some
> options) and I have succeeded in following with this page:
> http://www.eclipse.org/forums/index.php/t/419427/
>
> Now I can realize my customization by choosing to disable the original
> UML context in the preference page of properties view, my problem is
> how can I realize this operation programmatically?
> I found the class Preference in
> org.eclipse.papyrus.views.properties.preferences, I think it to be able
> to control our preference page, but I'm not sure, does anyone have some
> experience with this?
>
> Thank you!
Re: Preference page of properties view [message #1081523 is a reply to message #1080954] Wed, 07 August 2013 10:28 Go to previous message
JIAN SHEN is currently offline JIAN SHENFriend
Messages: 8
Registered: June 2013
Junior Member
Thank you guys! For those who are also interested:
public void earlyStartup() {
		
			final ConfigurationManager configurationManager = ConfigurationManager.instance;
			
			List<Context> contexts = new java.util.ArrayList<Context>(configurationManager.getCustomizableContexts());
			contexts.addAll(configurationManager.getMissingContexts());
			
			for(Context context : contexts) {
				final Context theContext = context;
				String name = theContext.getName();
				if(name.equals("UML")){
					configurationManager.disableContext(theContext, true);			
				}
			}
	 }	



Previous Topic:Allocation table and "Allocated from"
Next Topic:Exception opening models with Papyrus editor
Goto Forum:
  


Current Time: Fri Apr 19 07:30:53 GMT 2024

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

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

Back to the top