本文整理汇总了Java中org.eclipse.jface.preference.IPreferencePageContainer类的典型用法代码示例。如果您正苦于以下问题:Java IPreferencePageContainer类的具体用法?Java IPreferencePageContainer怎么用?Java IPreferencePageContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPreferencePageContainer类属于org.eclipse.jface.preference包,在下文中一共展示了IPreferencePageContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performOk
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的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;
}
示例2: createControl
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public Control createControl(Composite parent, IPreferencePageContainer container) {
Composite composite= new Composite(parent, SWT.NONE);
GridData gridData= new GridData(SWT.FILL, SWT.FILL, true, true);
composite.setLayoutData(gridData);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
composite.setLayout(layout);
fEnableField= new SelectionButtonDialogField(SWT.CHECK);
fEnableField.setLabelText(getPostSaveListenerName());
fEnableField.doFillIntoGrid(composite, 1);
createConfigControl(composite, container);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:21,代码来源:AbstractSaveParticipantPreferenceConfiguration.java
示例3: scheduleCleanerJobIfNecessary
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
/**
* This method has been copied from org.eclipse.xtext.builder.preferences.BuilderPreferencePage.
*/
private void scheduleCleanerJobIfNecessary(IPreferencePageContainer preferencePageContainer) {
Map<String, ValueDifference<String>> changes = getPreferenceChanges();
for (String key : changes.keySet()) {
if (key.matches("^" + CompilerProperties.OUTPUT_PREFERENCE_TAG + "\\.\\w+\\."
+ CompilerProperties.OUTPUT_PREFERENCE_TAG + "$")) {
ValueDifference<String> difference = changes.get(key);
scheduleCleanerJob(preferencePageContainer, difference.rightValue());
}
}
}
示例4: scheduleCleanerJob
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
/**
* This method has been copied from org.eclipse.xtext.builder.preferences.BuilderPreferencePage.
*/
private void scheduleCleanerJob(IPreferencePageContainer preferencePageContainer, String folderNameToClean) {
DerivedResourceCleanerJob derivedResourceCleanerJob = cleanerProvider.get();
derivedResourceCleanerJob.setUser(true);
derivedResourceCleanerJob.initialize(getProject(), folderNameToClean);
if (preferencePageContainer != null) {
IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
container.registerUpdateJob(derivedResourceCleanerJob);
} else {
derivedResourceCleanerJob.schedule();
}
}
示例5: createPreferenceLinkArea
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
/**
* Builds a PreferenceLinkArea if the platform supports it. On platforms
* that do not support a PreferenceLinkArea, you will be returned an empty
* control which has no size and does nothing.
*
* @return A Control that can be used to link to the preference area, if
* supported, or an empty control if the platform does not support
* preference links
*/
public static Control createPreferenceLinkArea(
final Composite parent,
final int style,
final String pageId,
final String message,
final IPreferencePageContainer container,
final Object pageData) {
try {
final Class preferenceLinkClass = Class.forName("org.eclipse.ui.dialogs.PreferenceLinkArea"); //$NON-NLS-1$
final Class workbenchPrefContainerClass =
Class.forName("org.eclipse.ui.preferences.IWorkbenchPreferenceContainer"); //$NON-NLS-1$
final Constructor preferenceLinkCtor = preferenceLinkClass.getConstructor(new Class[] {
Composite.class,
int.class,
String.class,
String.class,
workbenchPrefContainerClass,
Object.class
});
final Object preferenceLinkArea = preferenceLinkCtor.newInstance(new Object[] {
parent,
new Integer(style),
pageId,
message,
container,
pageData
});
final Method getControlMethod = preferenceLinkClass.getMethod("getControl", (Class[]) null); //$NON-NLS-1$
return (Control) getControlMethod.invoke(preferenceLinkArea, (Object[]) null);
} catch (final Exception e) {
return new EmptyControl(parent, style);
}
}
示例6: createControl
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
public Control createControl(Composite parent) {
Composite composite= new Composite(parent, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
GridLayout gridLayout= new GridLayout(2, false);
gridLayout.marginHeight= 0;
gridLayout.marginWidth= 0;
composite.setLayout(gridLayout);
SaveParticipantRegistry registry= JavaPlugin.getDefault().getSaveParticipantRegistry();
SaveParticipantDescriptor[] descriptors= registry.getSaveParticipantDescriptors();
if (descriptors.length == 0)
return composite;
Arrays.sort(descriptors, new Comparator<SaveParticipantDescriptor>() {
public int compare(SaveParticipantDescriptor d1, SaveParticipantDescriptor d2) {
return Collator.getInstance().compare(d1.getPostSaveListener().getName(), d2.getPostSaveListener().getName());
}
});
IPreferencePageContainer container= fPreferencePage.getContainer();
for (int i= 0; i < descriptors.length; i++) {
final SaveParticipantDescriptor descriptor= descriptors[i];
ISaveParticipantPreferenceConfiguration configuration= descriptor.createPreferenceConfiguration();
configuration.createControl(composite, container);
fConfigurations.add(configuration);
}
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:31,代码来源:SaveParticipantConfigurationBlock.java
示例7: createPreferenceContent
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
@Override
protected Control createPreferenceContent(final Composite composite,
final IPreferencePageContainer preferencePageContainer) {
console.debug("BuilderPreferencePage createPreferenceContent ");
return builderConfigurationBlock.createContents(composite);
}
示例8: scheduleCleanerJobIfNecessary
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
private void scheduleCleanerJobIfNecessary(final IPreferencePageContainer preferencePageContainer) {
console.debug("BuilderPreferencePage scheduleCleanerJobIfNecessary");
Map<String, ValueDifference<String>> changes = builderConfigurationBlock.getPreferenceChanges();
for (String key : changes.keySet()) {
if (key.matches("^" + EclipseOutputConfigurationProvider.OUTPUT_PREFERENCE_TAG + "\\.\\w+\\."
+ EclipseOutputConfigurationProvider.OUTPUT_DIRECTORY + "$")) {
ValueDifference<String> difference = changes.get(key);
scheduleCleanerJob(preferencePageContainer, difference.rightValue());
}
}
}
示例9: scheduleCleanerJob
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
private void scheduleCleanerJob(final IPreferencePageContainer preferencePageContainer,
final String folderNameToClean) {
console.debug("BuilderPreferencePage scheduleCleanerJob");
DerivedResourceCleanerJob derivedResourceCleanerJob = cleanerProvider.get();
derivedResourceCleanerJob.setUser(true);
derivedResourceCleanerJob.initialize(getProject(), folderNameToClean);
if (preferencePageContainer != null) {
IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
container.registerUpdateJob(derivedResourceCleanerJob);
} else {
derivedResourceCleanerJob.schedule();
}
}
示例10: createPageControl
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
public Control createPageControl( Composite parent )
{
propertyPage.setContainer( (IPreferencePageContainer) getContainer( ) );
propertyPage.createControl( parent );
return propertyPage.getControl( );
}
示例11: TFSGlobalProxiesControl
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
public TFSGlobalProxiesControl(
final Composite parent,
final int style,
final IPreferencePageContainer preferencePageContainer) {
super(parent, style);
final int verticalSectionSpacing = ControlSize.convertCharHeightToPixels(this, 1) * 2;
final GridLayout layout = SWTUtil.gridLayout(this, 2);
layout.verticalSpacing = verticalSectionSpacing;
SWTUtil.createLabel(this, getDisplay().getSystemImage(SWT.ICON_INFORMATION));
final String messageFormat = Messages.getString("TFSGlobalProxiesControl.SummaryLabelTextFormat"); //$NON-NLS-1$
final String message = MessageFormat.format(messageFormat, ProductInformation.getCurrent().toString());
final Label label = SWTUtil.createLabel(this, SWT.WRAP, message);
GridDataBuilder.newInstance().hGrab().hFill().wCHint(label, 80).applyTo(label);
final boolean showHttpProxyControls =
TFSCommonUIClientPlugin.getDefault().getProxyServiceTracker().getService() == null;
if (showHttpProxyControls) {
httpProxyControl = new HTTPProxyControl(this, SWT.NONE);
AutomationIDHelper.setWidgetID(httpProxyControl, HTTP_PROXY_CONTROL);
httpProxyControl.getGridLayout().marginHeight = 0;
httpProxyControl.getGridLayout().marginWidth = 0;
multiValidator.addValidatable(httpProxyControl);
GridDataBuilder.newInstance().hGrab().hFill().hSpan(layout).applyTo(httpProxyControl);
} else {
httpProxyControl = null;
}
tfProxyControl = new TFSProxyControl(this, SWT.NONE);
AutomationIDHelper.setWidgetID(tfProxyControl, TFS_PROXY_CONTROL);
tfProxyControl.getGridLayout().marginHeight = 0;
tfProxyControl.getGridLayout().marginWidth = 0;
multiValidator.addValidatable(tfProxyControl);
GridDataBuilder.newInstance().hGrab().hFill().hSpan(layout).applyTo(tfProxyControl);
if (httpProxyControl != null) {
ControlSize.align(new Alignable[] {
httpProxyControl,
tfProxyControl
});
}
if (!showHttpProxyControls) {
final Control linkControl =
PreferenceLinkAreaHelper.createPreferenceLinkArea(
this,
SWT.NONE,
"org.eclipse.ui.net.NetPreferences", //$NON-NLS-1$
Messages.getString("TFSGlobalProxiesControl.ClickHereToConfigureHttp"), //$NON-NLS-1$
preferencePageContainer,
null);
GridDataBuilder.newInstance().hGrab().hFill().hSpan(layout).applyTo(linkControl);
}
}
示例12: getContainer
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
@Override
public IPreferencePageContainer getContainer() {
return super.getContainer();
}
示例13: setContainer
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
@Override
public void setContainer(IPreferencePageContainer container) {
super.setContainer(container);
}
示例14: createPreferenceContent
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
@Override
protected Control createPreferenceContent(Composite composite, IPreferencePageContainer preferencePageContainer) {
return validatorConfigurationBlock.createContents(composite);
}
示例15: createPreferenceContent
import org.eclipse.jface.preference.IPreferencePageContainer; //导入依赖的package包/类
protected abstract Control createPreferenceContent(Composite composite,
IPreferencePageContainer preferencePageContainer);