当前位置: 首页>>代码示例>>Java>>正文


Java PreferencePage类代码示例

本文整理汇总了Java中org.eclipse.jface.preference.PreferencePage的典型用法代码示例。如果您正苦于以下问题:Java PreferencePage类的具体用法?Java PreferencePage怎么用?Java PreferencePage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PreferencePage类属于org.eclipse.jface.preference包,在下文中一共展示了PreferencePage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPage

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
@Override
public void createPage() {
	try {
		setPage(this.pageClass.newInstance());
	} catch (InstantiationException|IllegalAccessException e) {
		e.printStackTrace();
	}
	
	if (getLabelImage() != null) {
		getPage().setImageDescriptor(getImageDescriptor());
	}
       getPage().setTitle(getLabelText());
       
       ((PreferencePage)getPage()).setPreferenceStore(
       		new ScopedPreferenceStore(InstanceScope.INSTANCE, this.nodeQualifier));
}
 
开发者ID:fipro78,项目名称:e4-cookbook-migration-guide,代码行数:17,代码来源:ContributedPreferenceNode.java

示例2: createPage

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
@Override
public void createPage() {
	// create the page via DI using the OSGi service context
	try {
		IPreferencePage page = ContextInjectionFactory.make(this.pageClass, this.context);
		setPage(page);
		
		if (getLabelImage() != null) {
			getPage().setImageDescriptor(getImageDescriptor());
		}
		getPage().setTitle(getLabelText());
		
		((PreferencePage) getPage()).setPreferenceStore(this.store);
	}
	catch (Exception e) {
		if (this.logger != null) {
			this.logger.log(
					LogService.LOG_ERROR, 
					"Error on creating instance of " + this.pageClass.getName(), 
					e);
		}
	}
}
 
开发者ID:fipro78,项目名称:e4-preferences,代码行数:24,代码来源:ContributedPreferenceNode.java

示例3: handleSave

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
@Override
protected void handleSave() {
	final Iterator<IPreferenceNode> nodes = getPreferenceManager().getElements(PreferenceManager.PRE_ORDER).iterator();
	while (nodes.hasNext()) {
		final IPreferenceNode node = nodes.next();
		final IPreferencePage page = node.getPage();
		if (page instanceof PreferencePage) {
			final IPreferenceStore store = ((PreferencePage) page).getPreferenceStore();
			if (store != null && store.needsSaving() && store instanceof IPersistentPreferenceStore) {
				try {
					((IPersistentPreferenceStore) store).save();
				}
				catch (final IOException ioe) {
					final String message = JFaceMessages.get("err.preferences.save");
					logger.log(Level.SEVERE, message, ioe);
					EnhancedErrorDialog.openError(getShell(), title, message, IStatus.ERROR, ioe, new Image[] { Display.getCurrent().getSystemImage(SWT.ICON_ERROR) });
				}
			}
		}
	}
}
 
开发者ID:Albertus82,项目名称:JFaceUtils,代码行数:22,代码来源:EnhancedPreferenceDialog.java

示例4: SaveParticipantConfigurationBlock

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
public SaveParticipantConfigurationBlock(IScopeContext context, PreferencePage preferencePage) {
	Assert.isNotNull(context);
	Assert.isNotNull(preferencePage);

	fContext= context;
	fPreferencePage= preferencePage;
	fConfigurations= new ArrayList<ISaveParticipantPreferenceConfiguration>();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:SaveParticipantConfigurationBlock.java

示例5: JavaEditorHoverConfigurationBlock

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
public JavaEditorHoverConfigurationBlock(PreferencePage mainPreferencePage, OverlayPreferenceStore store) {
	Assert.isNotNull(mainPreferencePage);
	Assert.isNotNull(store);
	fMainPreferencePage= mainPreferencePage;
	fStore= store;
	fStore.addKeys(createOverlayStoreKeys());
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:JavaEditorHoverConfigurationBlock.java

示例6: JDBCSelectionPageHelper

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
JDBCSelectionPageHelper( PreferencePage page )
{
	DEFAULT_MESSAGE = JdbcPlugin.getResourceString( "wizard.message.editDataSource" ); //$NON-NLS-1$
	m_propertyPage = page;
	if ( page instanceof JDBCPropertyPage ) // bidi_hcg
		bidiSupportObj = ( (JDBCPropertyPage) page ).getBidiSupport( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:8,代码来源:JDBCSelectionPageHelper.java

示例7: setPreferenceStore

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
private void setPreferenceStore(String bundleId, PreferencePage page)
{
	// Affect preference store to this page if this is a
	// PreferencePage, else, must manage it internally
	// Set the issue#1 on github :
	// https://github.com/opcoach/e4Preferences/issues/1
	// And manage the extensions of IP
	initialisePreferenceStoreProviders();

	IPreferenceStore store = null;

	// Get the preference store according to policy.
	Object data = psProviders.get(bundleId);
	if (data != null)
	{
		if (data instanceof IPreferenceStore)
			store = (IPreferenceStore) data;
		else if (data instanceof IPreferenceStoreProvider)
			store = ((IPreferenceStoreProvider) data).getPreferenceStore();
		else if (data instanceof String)
			store = (IPreferenceStore) context.get((String) data);
		
	} else
	{
		// Default behavior : create a preference store for this bundle and remember of it
		store = new ScopedPreferenceStore(InstanceScope.INSTANCE, bundleId);
		psProviders.put(bundleId, store);
	}

	
	if (store != null)
		page.setPreferenceStore(store);
	else
	{
		logger.warn("Unable to set the preferenceStore for page " + page.getTitle() + " defined in bundle " + bundleId);
	}

}
 
开发者ID:opcoach,项目名称:e4Preferences,代码行数:39,代码来源:E4PreferenceRegistry.java

示例8: pageCreation

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
@Test
@ConditionalIgnore( condition = CocoaPlatform.class )
public void pageCreation() {
  IWorkbenchPreferencePage actual = new RegistryAdapter()
      .createExecutableExtension( PREFERENCE_PAGES_EP, IWorkbenchPreferencePage.class )
      .thatMatches( attribute( "id", PAGE_ID ) )
      .process();

  assertThat( actual )
    .isInstanceOf( PreferencePage.class );
}
 
开发者ID:fappel,项目名称:xiliary,代码行数:12,代码来源:ScrollbarPreferencePagePDETest.java

示例9: setPrefPageStatus

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
public static void setPrefPageStatus(PreferencePage prefPage, IStatusMessage status) {
	if(!SWTUtil.isOkToUse(prefPage.getControl())) {
		return;
	}
	
	prefPage.setValid(status == null || !status.getSeverity().isError());
	
	setDialogPageStatus(prefPage, status);
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:10,代码来源:DialogPageUtils.java

示例10: setDialogPageStatus

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
public static void setDialogPageStatus(PreferencePage prefPage, IStatusMessage status) {
	if(!SWTUtil.isOkToUse(prefPage.getControl())) {
		return;
	}
	
	if(status == null) {
		prefPage.setMessage(null);
	} else {
		prefPage.setMessage(status.getMessage(), severityToMessageType(status.getSeverity()));
	}
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:12,代码来源:DialogPageUtils.java

示例11: AbstractConfigurationBlock

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
public AbstractConfigurationBlock(OverlayPreferenceStore store, PreferencePage mainPreferencePage) {
	Assert.isNotNull(store);
	Assert.isNotNull(mainPreferencePage);
	fStore = store;
	fMainPage = mainPreferencePage;
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:7,代码来源:AbstractConfigurationBlock.java

示例12: getRootPreferencePage

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
@Override
public PreferencePage getRootPreferencePage() {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:evilwan,项目名称:raptor-chess-interface,代码行数:6,代码来源:IcsConnector.java

示例13: initBics2

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
protected void initBics2() {
	bics2 = new BicsConnector(new BicsConnectorContext() {
		@Override
		public String getDescription() {
			return local.getString("bicsConnector19");
		}

		@Override
		public String getShortName() {
			return "bics2";
		}
	}) {

		/**
		 * Override not needed.
		 */
		@Override
		public PreferencePage getRootPreferencePage() {
			return null;
		}

		/**
		 * Override not needed.
		 */
		@Override
		public PreferenceNode[] getSecondaryPreferenceNodes() {
			return null;
		}

		/**
		 * Override not needed.
		 */
		@Override
		protected void createMenuActions() {
		}

		/**
		 * Override the initFics2 method to do nothing to avoid the
		 * recursion.
		 */
		@Override
		protected void initBics2() {

		}

	};
}
 
开发者ID:evilwan,项目名称:raptor-chess-interface,代码行数:48,代码来源:BicsConnector.java

示例14: initFics2

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
protected void initFics2() {
	fics2 = new FicsConnector(
			new IcsConnectorContext(new IcsParser(false)) {
				@Override
				public String getDescription() {
					return local.getString("ficsConn26");
				}

				@Override
				public String getShortName() {
					return "fics2";
				}
			}) {

		/**
		 * Override not needed.
		 */
		@Override
		public PreferencePage getRootPreferencePage() {
			return null;
		}

		/**
		 * Override not needed.
		 */
		@Override
		public PreferenceNode[] getSecondaryPreferenceNodes() {
			return null;
		}

		/**
		 * Override not needed.
		 */
		@Override
		protected void createMenuActions() {
		}

		/**
		 * Override the initFics2 method to do nothing to avoid the
		 * recursion.
		 */
		@Override
		protected void initFics2() {

		}

	};
	fics2.fics1 = this;
}
 
开发者ID:evilwan,项目名称:raptor-chess-interface,代码行数:50,代码来源:FicsConnector.java

示例15: getPreferencePage

import org.eclipse.jface.preference.PreferencePage; //导入依赖的package包/类
@Override
public PreferencePage getPreferencePage() {
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:SWTViewer.java


注:本文中的org.eclipse.jface.preference.PreferencePage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。