本文整理汇总了Java中org.eclipse.jface.viewers.ViewerFilter类的典型用法代码示例。如果您正苦于以下问题:Java ViewerFilter类的具体用法?Java ViewerFilter怎么用?Java ViewerFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewerFilter类属于org.eclipse.jface.viewers包,在下文中一共展示了ViewerFilter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initPart
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final HardwareSensor hardwareSensor = (HardwareSensor)elt;
final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
// init values
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
// init part
clockSettings = new EObjectFlatComboSettings(hardwareSensor, HrmPackage.eINSTANCE.getHardwareResource_Clock());
timingPart.initClock(clockSettings);
// set the button mode
timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
}
// init filters
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
timingPart.addFilterToClock(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$
}
});
// Start of user code for additional businessfilters for clock
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
示例2: addFilterToComponent
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see be.cetic.simqri.metamodel.parts.ModelPropertiesEditionPart#addFilterComponent(ViewerFilter filter)
*
*/
public void addFilterToComponent(ViewerFilter filter) {
componentFilters.add(filter);
if (this.component != null) {
this.component.addFilter(filter);
}
}
示例3: addFilterToSchedulingParameters
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.polarsys.time4sys.ui.analysis.parts.TaskPropertiesEditionPart#addFilterSchedulingParameters(ViewerFilter filter)
* @generated
*/
public void addFilterToSchedulingParameters(ViewerFilter filter) {
schedulingParametersFilters.add(filter);
if (this.schedulingParameters != null) {
this.schedulingParameters.addFilter(filter);
}
}
示例4: addFilterToOutputs
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see be.cetic.simqri.metamodel.parts.BatchProcessPropertiesEditionPart#addFilterOutputs(ViewerFilter filter)
*
*/
public void addFilterToOutputs(ViewerFilter filter) {
outputsFilters.add(filter);
if (this.outputs != null) {
this.outputs.addFilter(filter);
}
}
示例5: getViewerFilter
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
@Override
protected ViewerFilter getViewerFilter() {
return new ViewerFilter() {
public boolean select(Viewer viewer, Object parentElement, Object element) {
return true;
}
};
}
示例6: addFilterToOffsets
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.polarsys.time4sys.ui.analysis.parts.EventModelPropertiesEditionPart#addFilterOffsets(ViewerFilter filter)
* @generated
*/
public void addFilterToOffsets(ViewerFilter filter) {
offsetsFilters.add(filter);
if (this.offsets != null) {
this.offsets.addFilter(filter);
}
}
示例7: initPart
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final HardwareTimingResource hardwareTimingResource = (HardwareTimingResource)elt;
final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
// init values
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
// init part
clockSettings = new EObjectFlatComboSettings(hardwareTimingResource, HrmPackage.eINSTANCE.getHardwareResource_Clock());
timingPart.initClock(clockSettings);
// set the button mode
timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
}
// init filters
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
timingPart.addFilterToClock(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$
}
});
// Start of user code for additional businessfilters for clock
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
开发者ID:polarsys,项目名称:time4sys,代码行数:47,代码来源:HardwareTimingResourceTimingPropertiesEditionComponent.java
示例8: addFilterToMutexes
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.polarsys.time4sys.ui.analysis.parts.AnalyzedSystemPropertiesEditionPart#addFilterMutexes(ViewerFilter filter)
* @generated
*/
public void addFilterToMutexes(ViewerFilter filter) {
mutexesFilters.add(filter);
if (this.mutexes != null) {
this.mutexes.addFilter(filter);
}
}
示例9: initPart
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final HardwareBridge hardwareBridge = (HardwareBridge)elt;
final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
// init values
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
// init part
clockSettings = new EObjectFlatComboSettings(hardwareBridge, HrmPackage.eINSTANCE.getHardwareResource_Clock());
timingPart.initClock(clockSettings);
// set the button mode
timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
}
// init filters
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
timingPart.addFilterToClock(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$
}
});
// Start of user code for additional businessfilters for clock
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
示例10: initPart
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final HardwareIo hardwareIo = (HardwareIo)elt;
final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
// init values
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
// init part
clockSettings = new EObjectFlatComboSettings(hardwareIo, HrmPackage.eINSTANCE.getHardwareResource_Clock());
timingPart.initClock(clockSettings);
// set the button mode
timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
}
// init filters
if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
timingPart.addFilterToClock(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$
}
});
// Start of user code for additional businessfilters for clock
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
示例11: initPart
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final SoftwareResource softwareResource = (SoftwareResource)elt;
final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
// init values
if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
resCtrlPolicySettings = new ReferencesTableSettings(softwareResource, GrmPackage.eINSTANCE.getResourceManager_ResCtrlPolicy());
timingPart.initResCtrlPolicy(resCtrlPolicySettings);
}
// init filters
if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
timingPart.addFilterToResCtrlPolicy(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof ResourceControlPolicy);
}
});
// Start of user code for additional businessfilters for resCtrlPolicy
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
示例12: addFilterToResourceParameterValue
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.polarsys.time4sys.ui.analysis.parts.SchedulerPropertiesEditionPart#addFilterResourceParameterValue(ViewerFilter filter)
* @generated
*/
public void addFilterToResourceParameterValue(ViewerFilter filter) {
resourceParameterValueFilters.add(filter);
if (this.resourceParameterValue != null) {
this.resourceParameterValue.addFilter(filter);
}
}
示例13: addFilterToSchedulableElements
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.polarsys.time4sys.ui.analysis.parts.AnalyzedSystemPropertiesEditionPart#addFilterSchedulableElements(ViewerFilter filter)
* @generated
*/
public void addFilterToSchedulableElements(ViewerFilter filter) {
schedulableElementsFilters.add(filter);
if (this.schedulableElements != null) {
this.schedulableElements.addFilter(filter);
}
}
示例14: initPart
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final NotificationResource notificationResource = (NotificationResource)elt;
final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
// init values
if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
resCtrlPolicySettings = new ReferencesTableSettings(notificationResource, GrmPackage.eINSTANCE.getResourceManager_ResCtrlPolicy());
timingPart.initResCtrlPolicy(resCtrlPolicySettings);
}
if (isAccessible(SrmViewsRepository.Timing.Properties.waitingQueuePolicy)) {
timingPart.initWaitingQueuePolicy(EEFUtils.choiceOfValues(notificationResource, SrmPackage.eINSTANCE.getSoftwareInteractionResource_WaitingQueuePolicy()), notificationResource.getWaitingQueuePolicy());
}
if (isAccessible(SrmViewsRepository.Timing.Properties.waitingQueueCapacity)) {
timingPart.setWaitingQueueCapacity(EEFConverterUtil.convertToString(EcorePackage.Literals.EINT, notificationResource.getWaitingQueueCapacity()));
}
if (isAccessible(SrmViewsRepository.Timing.Properties.waitingPolicyElements))
timingPart.setWaitingPolicyElements(notificationResource.getWaitingPolicyElements());
if (isAccessible(SrmViewsRepository.Timing.Properties.policy)) {
timingPart.initPolicy(EEFUtils.choiceOfValues(notificationResource, SrmPackage.eINSTANCE.getNotificationResource_Policy()), notificationResource.getPolicy());
}
if (isAccessible(SrmViewsRepository.Timing.Properties.mechanism)) {
timingPart.initMechanism(EEFUtils.choiceOfValues(notificationResource, SrmPackage.eINSTANCE.getNotificationResource_Mechanism()), notificationResource.getMechanism());
}
if (isAccessible(SrmViewsRepository.Timing.Properties.occurenceCountElements))
timingPart.setOccurenceCountElements(notificationResource.getOccurenceCountElements());
// init filters
if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
timingPart.addFilterToResCtrlPolicy(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof ResourceControlPolicy);
}
});
// Start of user code for additional businessfilters for resCtrlPolicy
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
示例15: initPart
import org.eclipse.jface.viewers.ViewerFilter; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final StorageResource storageResource = (StorageResource)elt;
final OtherPropertiesEditionPart otherPart = (OtherPropertiesEditionPart)editingPart;
// init values
if (isAccessible(GrmViewsRepository.Other.OtherProperties.pServices)) {
pServicesSettings = new ReferencesTableSettings(storageResource, GrmPackage.eINSTANCE.getResource_PServices());
otherPart.initPServices(pServicesSettings);
}
if (isAccessible(GrmViewsRepository.Other.OtherProperties.rServices)) {
rServicesSettings = new ReferencesTableSettings(storageResource, GrmPackage.eINSTANCE.getResource_RServices());
otherPart.initRServices(rServicesSettings);
}
// init filters
if (isAccessible(GrmViewsRepository.Other.OtherProperties.pServices)) {
otherPart.addFilterToPServices(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
return (element instanceof String && element.equals("")) || (element instanceof ResourceService); //$NON-NLS-1$
}
});
// Start of user code for additional businessfilters for pServices
// End of user code
}
if (isAccessible(GrmViewsRepository.Other.OtherProperties.rServices)) {
otherPart.addFilterToRServices(new EObjectFilter(GrmPackage.Literals.RESOURCE_SERVICE));
// Start of user code for additional businessfilters for rServices
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}