本文整理汇总了Java中org.eclipse.jface.preference.PreferenceNode类的典型用法代码示例。如果您正苦于以下问题:Java PreferenceNode类的具体用法?Java PreferenceNode怎么用?Java PreferenceNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PreferenceNode类属于org.eclipse.jface.preference包,在下文中一共展示了PreferenceNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerConfig
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
@Override
public void registerConfig() {
ConfigurationGUISetup setup = new ConfigurationGUISetup() {
@Override
public void proccess(PreferenceManager mger) {
PreferenceNode encryption = new PreferenceNode("compressMac", "Encryption", null,
CompressMacPreference.class.getCanonicalName());
PreferenceNode blockCipher = new PreferenceNode("blockcipher", "Block Cipher", null,
BlockCipherPreferencePage.class.getCanonicalName());
PreferenceNode streamCipher = new PreferenceNode("streamcipher", "Stream Cipher", null,
StreamCipherPreferencePage.class.getCanonicalName());
encryption.add(blockCipher);
encryption.add(streamCipher);
mger.addToRoot(encryption);
}
};
PreferenceGUIManager.add(setup);
}
示例2: configureWorkspaceSettings
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
private void configureWorkspaceSettings() {
String preferenceNodeId = this.getPreferenceNodeId();
IPreferencePage preferencePage = newPreferencePage();
final IPreferenceNode preferenceNode = new PreferenceNode(preferenceNodeId, preferencePage);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(preferenceNode);
final PreferenceDialog dialog = new PreferenceDialog(this.getControl().getShell(), manager);
BusyIndicator.showWhile(this.getControl().getDisplay(), new Runnable() {
@Override
public void run() {
dialog.create();
dialog.setMessage(preferenceNode.getLabelText());
dialog.open();
}
});
}
示例3: getSecondaryPreferenceNodes
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* Returns an array of the secondary preference nodes.
*/
public PreferenceNode[] getSecondaryPreferenceNodes() {
return new PreferenceNode[] {
new PreferenceNode("bicsMenuActions", new ActionContainerPage(
local.getString("bicsConnector1"),
local.getString("bicsConnector2"),
RaptorActionContainer.BicsMenu)),
new PreferenceNode("bics",
new ConnectorMessageBlockPage("bics")),
new PreferenceNode("bics", new BicsRightClickChannelMenu()),
new PreferenceNode("bics", new BicsRightClickGamesMenu()),
new PreferenceNode("bics", new BicsRightClickPersonMenu()),
new PreferenceNode("bics", new ConnectorQuadrantsPage("bics")),
new PreferenceNode("bics", new ConnectorQuadrantsPage("bics2")) };
}
示例4: getSecondaryPreferenceNodes
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* Returns an array of the secondary preference nodes.
*/
public PreferenceNode[] getSecondaryPreferenceNodes() {
return new PreferenceNode[] {
new PreferenceNode("ficsMenuActions", new ActionContainerPage(
local.getString("ficsConn3"),
local.getString("ficsConn4"),
RaptorActionContainer.FicsMenu)),
new PreferenceNode("fics",
new ConnectorMessageBlockPage("fics")),
new PreferenceNode("fics", new FicsRightClickChannelMenu()),
new PreferenceNode("fics", new FicsRightClickGamesMenu()),
new PreferenceNode("fics", new FicsRightClickPersonMenu()),
new PreferenceNode("fics", new ConnectorQuadrantsPage("fics")),
new PreferenceNode("fics", new ConnectorQuadrantsPage("fics2")), };
}
示例5: showPreferencePage
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* Show a single preference pages
*
* @param id
* - the preference page identification
* @param page
* - the preference page
*/
protected void showPreferencePage(String id, IPreferencePage page, final IProject project) {
final IPreferenceNode targetNode = new PreferenceNode(id, page);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
Shell shell = getControl().getShell();
final PreferenceDialog dialog = project == null ? new PreferenceDialog(shell, manager) : new PropertyDialog(shell,
manager, new StructuredSelection(project));
BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.open();
}
});
}
示例6: createPreferenceManager
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
protected PreferenceManager createPreferenceManager() {
final PreferenceManager manager = new PreferenceManager();
// Pages creation...
final Map<IPageDefinition, PreferenceNode> preferenceNodes = new HashMap<IPageDefinition, PreferenceNode>();
for (final IPageDefinition page : pageDefinitions) {
final PreferenceNode preferenceNode = new ConfigurationNode(page, preferences, preferencesCallback);
if (page.getParent() != null) {
preferenceNodes.get(page.getParent()).add(preferenceNode);
}
else {
manager.addToRoot(preferenceNode);
}
preferenceNodes.put(page, preferenceNode);
}
return manager;
}
示例7: showPreferencePage
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* This method allows us to open the preference dialog on the specific page, in this case the perspective page
*
* @param id
* the id of pref page to show
* @param page
* the actual page to show Copied from org.eclipse.debug.internal.ui.SWTUtil
*/
public static void showPreferencePage(String id, IPreferencePage page)
{
final IPreferenceNode targetNode = new PreferenceNode(id, page);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
final PreferenceDialog dialog = new PreferenceDialog(UIUtils.getActiveShell(), manager);
BusyIndicator.showWhile(getStandardDisplay(), new Runnable()
{
public void run()
{
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.open();
}
});
}
示例8: registerPreferenceNodes
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
public void registerPreferenceNodes(PreferenceManager preferenceManager)
{
String className;
//System.out.println("BT AVAIL: " + btAvailable + " and asterisk 1.2: "
// + asterisk.getVersion().contains("Asterisk 1.2"));
//if (asterisk.supportsRedirectMode() && btAvailable)
//TODO fix the detection
if (btAvailable)
{
className = BluetoothPreferencePage.class.getName();
}
else
{
className = BluetoothDisabledPreferencePage.class.getName();
}
PreferenceNode bluetoothNode = new PreferenceNode("bluetooth", //$NON-NLS-1$
Messages.getString("BluetoothPreferencePage.title"), null, //$NON-NLS-1$
className);
preferenceManager.addToRoot(bluetoothNode);
}
示例9: initModules
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* load all providers.
*
* This method loads all provider available.
*/
public static void initModules() {
// prepare to load modules
modules = new File("modules");
CommonFunctions.initDir(modules);
m = new PF4JModuleLoader();
// put system configuration first
ConfigurationGUISetup setup = new ConfigurationGUISetup() {
@Override
public void proccess(PreferenceManager mger) {
PreferenceNode system = new PreferenceNode("system", "System", null,
SystemPreferencePage.class.getCanonicalName());
mger.addToRoot(system);
}
};
PreferenceGUIManager.add(setup);
// register the providers
AuthManagers.INSTANCE.registerAuthProvider(new ViperfishAuthProvider());
EntryDatabases.INSTANCE.registerEntryDatabaseProvider(new ViperfishEntryDatabaseProvider());
Indexers.INSTANCE.registerIndexerProvider(new ViperfishIndexerProvider());
JournalTransformers.INSTANCE.registerTransformerProvider(new ViperfishEncryptionProvider());
// load third party
m.loadModules(modules);
}
示例10: showPreferencePage
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* Show a single preference pages
*
* @param id
* - the preference page identification
* @param page
* - the preference page
*/
protected void showPreferencePage(String id, IPreferencePage page) {
final IPreferenceNode targetNode = new PreferenceNode(id, page);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
final PreferenceDialog dialog = new PreferenceDialog(getControl()
.getShell(), manager);
BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.open();
}
});
}
示例11: showPreferencePage
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* Show a single preference pages
* @param id - the preference page identification
* @param page - the preference page
*/
protected void showPreferencePage(String id, IPreferencePage page) {
final IPreferenceNode targetNode = new PreferenceNode(id, page);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
final PreferenceDialog dialog =
new PreferenceDialog(getControl().getShell(), manager);
BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.open();
}
});
}
示例12: showPreferencePage
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
/**
* Show a single preference pages
*
* @param id
* - the preference page identification
* @param page
* - the preference page
*/
protected void showPreferencePage(String id, IPreferencePage page) {
final IPreferenceNode targetNode = new PreferenceNode(id, page);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
final PreferenceDialog dialog = new PreferenceDialog(getControl().getShell(), manager);
BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.open();
}
});
}
示例13: registerPreferenceNodes
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
public void registerPreferenceNodes(PreferenceManager preferenceManager) {
String className;
className = LwrfPreferencePage.class.getName();
PreferenceNode lwrfNode = new PreferenceNode("lwrf", //$NON-NLS-1$
Messages.getString("LwrfPreferencePage.title"), null, //$NON-NLS-1$
className);
preferenceManager.addToRoot(lwrfNode);
}
示例14: showPreferencePage
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
protected void showPreferencePage(String id, IPreferencePage page) {
final IPreferenceNode targetNode = new PreferenceNode(id, page);
PreferenceManager manager = new PreferenceManager();
manager.addToRoot(targetNode);
final PreferenceDialog dialog =
new PreferenceDialog(getControl().getShell(), manager);
BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() {
public void run() {
dialog.create();
dialog.setMessage(targetNode.getLabelText());
dialog.open();
}
});
}
示例15: Preferences
import org.eclipse.jface.preference.PreferenceNode; //导入依赖的package包/类
public Preferences(Shell parent) {
PreferenceManager preferenceManager = new PreferenceManager();
PreferenceNode general = new PreferenceNode("General", new PreferencePageGeneral());
preferenceManager.addToRoot(general);
PreferenceNode cmd = new PreferenceNode("Command line", new PreferencePageCmd());
preferenceManager.addToRoot(cmd);
preferenceDialog = new PreferenceDialog(parent, preferenceManager);
preferenceDialog.setPreferenceStore(preferences);
}