Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Programmatically changing sirius default font on Macs
Programmatically changing sirius default font on Macs [message #1785564] Mon, 16 April 2018 19:10 Go to next message
Louis Detweiler is currently offline Louis DetweilerFriend
Messages: 57
Registered: August 2017
Member
I am trying to change the default font field that appears in window -> preferences -> sirius -> sirius diagram -> appearance. I use the following code on startup of my eclipse application:

  private static final FontData DEFAULT_WINDOWS_FONT = new FontData("Arial", 7, SWT.NORMAL);
  private static final FontData DEFAULT_NON_WINDOWS_FONT = new FontData("Helvetica", 10, SWT.NORMAL);

IEclipsePreferences prefs = new DefaultScope().getNode("org.eclipse.sirius.diagram.ui");
    if(System.getProperty("os.name").startsWith("Windows")){
      prefs.put("Appearance.defaultFont", DEFAULT_WINDOWS_FONT.toString());
    } else {
      prefs.put("Appearance.defaultFont", DEFAULT_NON_WINDOWS_FONT.toString());
    }


This works on windows, but it does not work on macs. Any ideas why?
Re: Programmatically changing sirius default font on Macs [message #1785622 is a reply to message #1785564] Tue, 17 April 2018 14:49 Go to previous message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 161
Registered: June 2017
Senior Member
Hi,

Are you sur your plugin doing the override is loaded after oes.diagam.ui on mac?

Regards,


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Call java utilities routines from AQL
Next Topic:Sirius on the web and custom properties
Goto Forum:
  


Current Time: Sun Sep 23 08:01:00 GMT 2018

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

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

Back to the top