Mac OS X上的Eclipse PDE:在运行时获取正确的字体大小?

时间:2021-04-19 19:01:08

There's an annoying "feature" when using Eclipse PDE on Mac OS X: the font size of the runtime IDE is not the same as the true IDE. If you're developing a plug-in and you launch an Eclipse instance to test it (from within Eclipse), you will notice that the spawned instance looks very different from the original running Eclipse instance. The fonts are big and ugly. This makes it hard to fine-tune the plug-in UI.

在Mac OS X上使用Eclipse PDE时有一个烦人的“功能”:运行时IDE的字体大小与真正的IDE不同。如果您正在开发一个插件并且启动一个Eclipse实例来测试它(来自Eclipse中),您会注意到生成的实例看起来与原始运行的Eclipse实例非常不同。字体很大而且很难看。这使得很难微调插件UI。

BTW, I did not encounter that behavior of Windows.

顺便说一下,我没有遇到过Windows的那种行为。

Any ideas how to quickly solve this issue?

任何想法如何快速解决这个问题?

Thanks.

2 个解决方案

#1


3  

Found the answer.

找到了答案。

You need to add the following VM argument to your launch configuration: -Dorg.eclipse.swt.internal.carbon.smallFonts

您需要将以下VM参数添加到启动配置:-Dorg.eclipse.swt.internal.carbon.smallFonts

I opened a defect about it. Hopefully it will be fixed.

我揭开了它的缺陷。希望它会被修复。

#2


0  

Eclipse saves its preferences on a per-workspace base. You probably don't use the same workspace for both eclipse instances. Threfore you'd need to set the preferences for the spawn once or copy it to the spawn-workspace from your original one.

Eclipse将其首选项保存在每个工作区的基础上。您可能不会为两个eclipse实例使用相同的工作空间。因此,您需要为spawn设置一次首选项,或者将其从原始工作区复制到spawn-workspace。

Now you've got the default settings and that is probably not what you've set in your instance.

现在您已经获得了默认设置,这可能不是您在实例中设置的设置。

#1


3  

Found the answer.

找到了答案。

You need to add the following VM argument to your launch configuration: -Dorg.eclipse.swt.internal.carbon.smallFonts

您需要将以下VM参数添加到启动配置:-Dorg.eclipse.swt.internal.carbon.smallFonts

I opened a defect about it. Hopefully it will be fixed.

我揭开了它的缺陷。希望它会被修复。

#2


0  

Eclipse saves its preferences on a per-workspace base. You probably don't use the same workspace for both eclipse instances. Threfore you'd need to set the preferences for the spawn once or copy it to the spawn-workspace from your original one.

Eclipse将其首选项保存在每个工作区的基础上。您可能不会为两个eclipse实例使用相同的工作空间。因此,您需要为spawn设置一次首选项,或者将其从原始工作区复制到spawn-workspace。

Now you've got the default settings and that is probably not what you've set in your instance.

现在您已经获得了默认设置,这可能不是您在实例中设置的设置。