use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class ParticipantParticipantPropertiesEditionComponent method initPart.
/**
* {@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 Participant participant = (Participant) elt;
final ParticipantPropertiesEditionPart participantPart = (ParticipantPropertiesEditionPart) editingPart;
// init values
if (isAccessible(InteractionViewsRepository.Participant.Properties.name))
participantPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, participant.getName()));
if (isAccessible(InteractionViewsRepository.Participant.Properties.type)) {
// init part
typeSettings = new EObjectFlatComboSettings(participant, InteractionPackage.eINSTANCE.getParticipant_Type());
participantPart.initType(typeSettings);
// set the button mode
participantPart.setTypeButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(InteractionViewsRepository.Participant.Properties.description))
participantPart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, participant.getDescription()));
if (isAccessible(InteractionViewsRepository.Participant.Properties.type)) {
participantPart.addFilterToType(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) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof ObeoDSMObject);
}
});
// Start of user code for additional businessfilters for type
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class PackagePackage_PropertiesEditionComponent method initPart.
/**
* {@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 Package package_ = (Package) elt;
final Package_PropertiesEditionPart package_Part = (Package_PropertiesEditionPart) editingPart;
// init values
if (isAccessible(CinematicViewsRepository.Package_.Properties.description))
package_Part.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, package_.getDescription()));
if (isAccessible(CinematicViewsRepository.Package_.Properties.name))
package_Part.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, package_.getName()));
if (isAccessible(CinematicViewsRepository.Package_.Properties.flows)) {
flowsSettings = new ReferencesTableSettings(package_, CinematicPackage.eINSTANCE.getAbstractPackage_Flows());
package_Part.initFlows(flowsSettings);
}
if (isAccessible(CinematicViewsRepository.Package_.Properties.viewContainers)) {
viewContainersSettings = new ReferencesTableSettings(package_, CinematicPackage.eINSTANCE.getAbstractPackage_ViewContainers());
package_Part.initViewContainers(viewContainersSettings);
}
if (isAccessible(CinematicViewsRepository.Package_.Properties.subPackages)) {
subPackagesSettings = new ReferencesTableSettings(package_, CinematicPackage.eINSTANCE.getAbstractPackage_SubPackages());
package_Part.initSubPackages(subPackagesSettings);
}
if (isAccessible(CinematicViewsRepository.Package_.Properties.flows)) {
package_Part.addFilterToFlows(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) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof Flow);
}
});
// Start of user code for additional businessfilters for flows
// End of user code
}
if (isAccessible(CinematicViewsRepository.Package_.Properties.viewContainers)) {
package_Part.addFilterToViewContainers(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) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof ViewContainer);
}
});
// Start of user code for additional businessfilters for viewContainers
// End of user code
}
if (isAccessible(CinematicViewsRepository.Package_.Properties.subPackages)) {
package_Part.addFilterToSubPackages(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) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof Package);
}
});
// Start of user code for additional businessfilters for subPackages
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class ActionStateActionStatePropertiesEditionComponent method initPart.
/**
* {@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 ActionState actionState = (ActionState) elt;
final ActionStatePropertiesEditionPart actionStatePart = (ActionStatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(FlowViewsRepository.ActionState.Properties.description))
actionStatePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, actionState.getDescription()));
if (isAccessible(FlowViewsRepository.ActionState.Properties.actions)) {
actionsSettings = new ReferencesTableSettings(actionState, FlowPackage.eINSTANCE.getFlowState_Actions());
actionStatePart.initActions(actionsSettings);
}
if (isAccessible(FlowViewsRepository.ActionState.Properties.name))
actionStatePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, actionState.getName()));
if (isAccessible(FlowViewsRepository.ActionState.Properties.actions)) {
actionStatePart.addFilterToActions(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) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof FlowAction);
}
});
// Start of user code for additional businessfilters for actions
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class AsyncEventStateAsyncEventStatePropertiesEditionComponent method initPart.
/**
* {@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 AsyncEventState asyncEventState = (AsyncEventState) elt;
final AsyncEventStatePropertiesEditionPart asyncEventStatePart = (AsyncEventStatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(FlowViewsRepository.AsyncEventState.Properties.description))
asyncEventStatePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, asyncEventState.getDescription()));
if (isAccessible(FlowViewsRepository.AsyncEventState.Properties.actions)) {
actionsSettings = new ReferencesTableSettings(asyncEventState, FlowPackage.eINSTANCE.getFlowState_Actions());
asyncEventStatePart.initActions(actionsSettings);
}
if (isAccessible(FlowViewsRepository.AsyncEventState.Properties.name))
asyncEventStatePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, asyncEventState.getName()));
if (isAccessible(FlowViewsRepository.AsyncEventState.Properties.actions)) {
asyncEventStatePart.addFilterToActions(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) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof FlowAction);
}
});
// Start of user code for additional businessfilters for actions
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.jface.viewers.ViewerFilter in project InformationSystem by ObeoNetwork.
the class FinalStateFinalStatePropertiesEditionComponent method initPart.
/**
* {@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 FinalState finalState = (FinalState) elt;
final FinalStatePropertiesEditionPart finalStatePart = (FinalStatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(FlowViewsRepository.FinalState.Properties.description))
finalStatePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, finalState.getDescription()));
if (isAccessible(FlowViewsRepository.FinalState.Properties.actions)) {
actionsSettings = new ReferencesTableSettings(finalState, FlowPackage.eINSTANCE.getFlowState_Actions());
finalStatePart.initActions(actionsSettings);
}
if (isAccessible(FlowViewsRepository.FinalState.Properties.name))
finalStatePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, finalState.getName()));
if (isAccessible(FlowViewsRepository.FinalState.Properties.actions)) {
finalStatePart.addFilterToActions(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) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof FlowAction);
}
});
// Start of user code for additional businessfilters for actions
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations