org.eclipse.jface.preference.IPreferencePage Java Examples

The following examples show how to use org.eclipse.jface.preference.IPreferencePage. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SWTUtil.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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();
		}
	});
}
 
Example #2
Source File: FieldEditorOverlayPage.java    From cppcheclipse with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
		}
	});
}
 
Example #3
Source File: CppStylePropertyPage.java    From CppStyle with MIT License 5 votes vote down vote up
/**
 * Creates a new preferences page and opens it
 */
public void configureWorkspaceSettings() {
	// create a new instance of the current class
	IPreferencePage page = new CppStylePerfPage();
	page.setTitle(getTitle());
	// and show it
	showPreferencePage(CppStyleConstants.PerfPageId, page);
}
 
Example #4
Source File: CppStylePropertyPage.java    From CppStyle with MIT License 5 votes vote down vote up
/**
 * 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();
		}
	});
}
 
Example #5
Source File: BonitaPreferenceDialog.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean close() {
    for (final IPreferencePage page : applyOnBack) {
        page.performOk();
    }
    applyOnBack.clear();
    return super.close();
}
 
Example #6
Source File: StylePreferenceNode.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public StylePreferenceNode( String id, IPreferencePage preferencePage )
{
	super( id, preferencePage );
}