• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IWorkbenchPreferenceContainer类的典型用法和代码示例

未分类 5次浏览

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

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

示例1: performOk

点赞 3

import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; //导入依赖的package包/类
@Override
public boolean performOk() {
	IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
	if (!processChanges(container)) {
		return false;
	}
	boolean retVal = super.performOk();

	if (retVal && isProjectPreferencePage()) {
		try {
			IPreferenceStore preferenceStore = preferenceStoreAccessImpl.getWritablePreferenceStore(getProject());
			if (preferenceStore instanceof IPersistentPreferenceStore) {
				((IPersistentPreferenceStore) preferenceStore).save();
			}
		} catch (Exception e) {
			System.err.println(e);
			retVal = false;
		}
	}
	return retVal;
}
 

开发者ID:eclipse,
项目名称:n4js,
代码行数:22,
代码来源:AbstractN4JSPreferencePage.java

示例2: AbstractFormatterSelectionBlock

点赞 3

import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; //导入依赖的package包/类
public AbstractFormatterSelectionBlock(IStatusChangeListener context, IProject project,
		IWorkbenchPreferenceContainer container)
{
	super(context, project, ProfileManager.collectPreferenceKeys(TEMP_LIST, true), container);
	Collections.sort(TEMP_LIST, new Comparator<IScriptFormatterFactory>()
	{
		public int compare(IScriptFormatterFactory s1, IScriptFormatterFactory s2)
		{
			return s1.getName().compareToIgnoreCase(s2.getName());
		}
	});
	factories = TEMP_LIST.toArray(new IScriptFormatterFactory[TEMP_LIST.size()]);
	TEMP_LIST = new ArrayList<IScriptFormatterFactory>();
	sourcePreviewViewers = new ArrayList<SourceViewer>();

	// Override the super preferences lookup order.
	// All the changes to the formatter settings should go to the instance scope (no project scope here). Only the
	// selected profile will be picked from the project scope and then the instance scope when requested.
	fLookupOrder = new IScopeContext[] { EclipseUtil.instanceScope(), EclipseUtil.defaultScope() };
}
 

开发者ID:apicloudcom,
项目名称:APICloud-Studio,
代码行数:21,
代码来源:AbstractFormatterSelectionBlock.java

示例3: performOk

点赞 3

import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; //导入依赖的package包/类
@Override
public boolean performOk()
{
	final boolean rebuild = rebuild();
	final boolean reReconcile = needsReconcile();
	Job buildJob = new ApplyChangesAndBuildJob(Messages.ValidationPreferencePage_RebuildJobTitle, rebuild,
			reReconcile);

	IPreferencePageContainer container = getContainer();
	if (container instanceof IWorkbenchPreferenceContainer)
	{
		((IWorkbenchPreferenceContainer) container).registerUpdateJob(buildJob);
	}
	else
	{
		buildJob.schedule();
	}

	return true;
}
 

开发者ID:apicloudcom,
项目名称:APICloud-Studio,
代码行数:21,
代码来源:ValidationPreferencePage.java

示例4: createUI_60_HrZone

点赞 3

import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; //导入依赖的package包/类
private Control createUI_60_HrZone(final Composite parent) {

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
		GridLayoutFactory.swtDefaults().extendedMargins(5, 5, 10, 5).numColumns(1).applyTo(container);
		{
			final PreferenceLinkArea prefLink = new PreferenceLinkArea(
					container,
					SWT.NONE,
					PrefPagePeople.ID,
					Messages.Compute_HrZone_Link,
					(IWorkbenchPreferenceContainer) getContainer(),
					new PrefPagePeopleData(PrefPagePeople.PREF_DATA_SELECT_HR_ZONES, null));

			GridDataFactory
					.fillDefaults()//
					.grab(true, false)
					.hint(DEFAULT_DESCRIPTION_WIDTH, SWT.DEFAULT)
					.applyTo(prefLink.getControl());
		}

		return container;
	}
 

开发者ID:wolfgang-ch,
项目名称:mytourbook,
代码行数:24,
代码来源:PrefPageComputedValues.java

示例5: createContents

点赞 3

import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; //导入依赖的package包/类
@Override
protected Control createContents(Composite parent) {
	final Composite composite= new Composite(parent, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	composite.setLayout(new GridLayout());

	Link link= new Link(composite, SWT.WRAP);
	GridData data= new GridData(SWT.FILL, SWT.BEGINNING, true, false);
	data.widthHint= 300;
	link.setLayoutData(data);
	link.setText(PreferencesMessages.JavaEditorPropertyPage_SaveActionLink_Text);
	link.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer)getContainer();
			container.openPage(SaveParticipantPreferencePage.PROPERTY_PAGE_ID, null);
		}
	});
	noDefaultAndApplyButton();
	Dialog.applyDialogFont(composite);
	return composite;
}
 

开发者ID:trylimits,
项目名称:Eclipse-Postfix-Code-Completion,
代码行数:23,
代码来源:JavaEditorPropertyPage.java

示例6: ComplianceConfigurationBlock

点赞 3

import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; //导入依赖的package包/类
public ComplianceConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) {
	super(context, project, getKeys(project != null), container);
	setDefaultCompilerComplianceValues();

	fBlockEnableState= null;
	fComplianceFollowsEEControls= new ArrayList<Control>();
	fComplianceControls= new ArrayList<Control>();
	fComplianceChildControls= new ArrayList<Control>();

	fComplianceStatus= new StatusInfo();

	fRememberedUserCompliance= new String[] { // caution: order depends on IDX_* constants
		getValue(PREF_PB_ASSERT_AS_IDENTIFIER),
		getValue(PREF_PB_ENUM_AS_IDENTIFIER),
		getValue(PREF_SOURCE_COMPATIBILITY),
		getValue(PREF_CODEGEN_TARGET_PLATFORM),
		getValue(PREF_COMPLIANCE),
		getValue(PREF_CODEGEN_INLINE_JSR_BYTECODE),
		getValue(PREF_CODEGEN_METHOD_PARAMETERS_ATTR)
	};
}
 

开发者ID:trylimits,
项目名称:Eclipse-Postfix-Code-Completion,
代码行数:22,
代码来源:ComplianceConfigurationBlock.java

示例7: ProjectsWorkbookPage

点赞 3

import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; //导入依赖的package包%2


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)