use of org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings in project InformationSystem by ObeoNetwork.
the class SubflowStateSubflowStatePropertiesEditionComponent 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 SubflowState subflowState = (SubflowState) elt;
final SubflowStatePropertiesEditionPart subflowStatePart = (SubflowStatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(FlowViewsRepository.SubflowState.Properties.description))
subflowStatePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, subflowState.getDescription()));
if (isAccessible(FlowViewsRepository.SubflowState.Properties.actions)) {
actionsSettings = new ReferencesTableSettings(subflowState, FlowPackage.eINSTANCE.getFlowState_Actions());
subflowStatePart.initActions(actionsSettings);
}
if (isAccessible(FlowViewsRepository.SubflowState.Properties.subflow)) {
// init part
subflowSettings = new EObjectFlatComboSettings(subflowState, FlowPackage.eINSTANCE.getSubflowState_Subflow());
subflowStatePart.initSubflow(subflowSettings);
// set the button mode
subflowStatePart.setSubflowButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(FlowViewsRepository.SubflowState.Properties.actions)) {
subflowStatePart.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
}
if (isAccessible(FlowViewsRepository.SubflowState.Properties.subflow)) {
subflowStatePart.addFilterToSubflow(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 Flow);
}
});
// Start of user code for additional businessfilters for subflow
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings in project InformationSystem by ObeoNetwork.
the class TransitionTransitionPropertiesEditionComponent 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 Transition transition = (Transition) elt;
final TransitionPropertiesEditionPart transitionPart = (TransitionPropertiesEditionPart) editingPart;
// init values
if (isAccessible(StatemachineViewsRepository.Transition.Properties.description))
transitionPart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, transition.getDescription()));
if (isAccessible(StatemachineViewsRepository.Transition.Properties.keywords))
transitionPart.setKeywords(transition.getKeywords());
if (isAccessible(StatemachineViewsRepository.Transition.Properties.guard))
transitionPart.setGuard(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, transition.getGuard()));
if (isAccessible(StatemachineViewsRepository.Transition.Properties.from)) {
// init part
fromSettings = new EObjectFlatComboSettings(transition, StateMachinePackage.eINSTANCE.getTransition_From());
transitionPart.initFrom(fromSettings);
// set the button mode
transitionPart.setFromButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(StatemachineViewsRepository.Transition.Properties.to)) {
// init part
toSettings = new EObjectFlatComboSettings(transition, StateMachinePackage.eINSTANCE.getTransition_To());
transitionPart.initTo(toSettings);
// set the button mode
transitionPart.setToButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(StatemachineViewsRepository.Transition.Properties.from)) {
transitionPart.addFilterToFrom(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 AbstractState);
}
});
// Start of user code for additional businessfilters for from
// End of user code
}
if (isAccessible(StatemachineViewsRepository.Transition.Properties.to)) {
transitionPart.addFilterToTo(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 AbstractState);
}
});
// Start of user code for additional businessfilters for to
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings in project InformationSystem by ObeoNetwork.
the class ParameterParameterPropertiesEditionComponent 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 Parameter parameter = (Parameter) elt;
final ParameterPropertiesEditionPart parameterPart = (ParameterPropertiesEditionPart) editingPart;
// init values
if (isAccessible(SoaViewsRepository.Parameter.Properties.name))
parameterPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, parameter.getName()));
if (isAccessible(SoaViewsRepository.Parameter.Properties.multiplicity)) {
parameterPart.initMultiplicity(EEFUtils.choiceOfValues(parameter, SoaPackage.eINSTANCE.getParameter_Multiplicity()), parameter.getMultiplicity());
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.isUnique)) {
parameterPart.setIsUnique(parameter.isIsUnique());
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.isOrdered)) {
parameterPart.setIsOrdered(parameter.isIsOrdered());
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.type)) {
// init part
typeSettings = new EObjectFlatComboSettings(parameter, SoaPackage.eINSTANCE.getParameter_Type());
parameterPart.initType(typeSettings);
// set the button mode
parameterPart.setTypeButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(SoaViewsRepository.Parameter.Properties.description))
parameterPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, parameter.getDescription()));
// init filters
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings in project InformationSystem by ObeoNetwork.
the class WireWirePropertiesEditionComponent 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 Wire wire = (Wire) elt;
final WirePropertiesEditionPart wirePart = (WirePropertiesEditionPart) editingPart;
// init values
if (isAccessible(SoaViewsRepository.Wire.Properties.source)) {
// init part
sourceSettings = new EObjectFlatComboSettings(wire, SoaPackage.eINSTANCE.getWire_Source());
wirePart.initSource(sourceSettings);
// set the button mode
wirePart.setSourceButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(SoaViewsRepository.Wire.Properties.dest)) {
// init part
destSettings = new EObjectFlatComboSettings(wire, SoaPackage.eINSTANCE.getWire_Dest());
wirePart.initDest(destSettings);
// set the button mode
wirePart.setDestButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(SoaViewsRepository.Wire.Properties.description))
wirePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, wire.getDescription()));
// init filters
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings in project InformationSystem by ObeoNetwork.
the class ActorActorPropertiesEditionComponent 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 Actor actor = (Actor) elt;
final ActorPropertiesEditionPart actorPart = (ActorPropertiesEditionPart) editingPart;
// init values
if (isAccessible(GraalViewsRepository.Actor.Properties.description))
actorPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, actor.getDescription()));
if (isAccessible(GraalViewsRepository.Actor.Properties.subActors)) {
subActorsSettings = new ReferencesTableSettings(actor, GraalPackage.eINSTANCE.getActor_SubActors());
actorPart.initSubActors(subActorsSettings);
}
if (isAccessible(GraalViewsRepository.Actor.Properties.superActor)) {
// init part
superActorSettings = new EObjectFlatComboSettings(actor, GraalPackage.eINSTANCE.getActor_SuperActor());
actorPart.initSuperActor(superActorSettings);
// set the button mode
actorPart.setSuperActorButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(GraalViewsRepository.Actor.Properties.name))
actorPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, actor.getName()));
if (isAccessible(GraalViewsRepository.Actor.Properties.subActors)) {
actorPart.addFilterToSubActors(new EObjectFilter(GraalPackage.Literals.ACTOR));
// Start of user code for additional businessfilters for subActors
// End of user code
}
if (isAccessible(GraalViewsRepository.Actor.Properties.superActor)) {
actorPart.addFilterToSuperActor(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 Actor);
}
});
// Start of user code for additional businessfilters for superActor
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations