文章列表
在自己的Eclipse RCP 产品中,可能经常要集成第三方的插件,来满足特定的功能需要。但是对于一些不需要的功能,通常的做法是该插件修改源代码。如果出于lisence或非开源的原因,无法修改,或删除其源代码,就要考虑如何在RCP中控制其扩展点的加载。
可以在RCP的WorkbenchWindowAdvisor.preWindowOpen中,取到所有加载的扩展点,然后进行相应的过滤处理。首先使用 WorkbenchPlugin.getDefault() 得到WorkbenchPlugin;通过 WorkbenchPlugin可以获取各种类型的扩展点的注册表。WorkbenchPlu ...
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), PreferenceConstants.PREF_PAGE_AUTO_UPDATES, null, null);
dialog.open();
来源:org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPopup 96L
This example retrieves the login name of the user that is running the application.
try {
String loginAppName = "GetLoginNameUnix";
// If the application is run on NT rather than Unix, use this name
loginAppName = "GetLoginNameNT";
// Create login contex ...
int decimalPlaces = 2;
// Truncates the big decimal value.
bd = bd.setScale(decimalPlaces, BigDecimal.ROUND_DOWN);
String string = bd.toString();
// Get a byte array
byte[] bytes = new byte[]{(byte)0x12, (byte)0x0F, (byte)0xF0};
// Create a BigInteger using the byte array
BigInteger bi = new BigInteger(bytes);
// Format to binary
String s = bi.toString(2); // 100100000111111110000
// Format to octal
s = bi.toString(8); ...
BigInteger bi = new BigInteger("1023");
// Parse and format to binary
bi = new BigInteger("1111111111", 2); // 1023
String s = bi.toString(2); // 1111111111
// Parse and format to octal
bi = new BigInteger("1777", 8); // 1023
s = bi.toString( ...