use of org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings in project InformationSystem by ObeoNetwork.
the class ViewStateViewStatePropertiesEditionComponent 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 ViewState viewState = (ViewState) elt;
final ViewStatePropertiesEditionPart viewStatePart = (ViewStatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(FlowViewsRepository.ViewState.Properties.description))
viewStatePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, viewState.getDescription()));
if (isAccessible(FlowViewsRepository.ViewState.Properties.actions)) {
actionsSettings = new ReferencesTableSettings(viewState, FlowPackage.eINSTANCE.getFlowState_Actions());
viewStatePart.initActions(actionsSettings);
}
if (isAccessible(FlowViewsRepository.ViewState.Properties.name))
viewStatePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, viewState.getName()));
if (isAccessible(FlowViewsRepository.ViewState.Properties.newInstance)) {
viewStatePart.setNewInstance(viewState.isNewInstance());
}
if (isAccessible(FlowViewsRepository.ViewState.Properties.refresh)) {
viewStatePart.setRefresh(viewState.isRefresh());
}
if (isAccessible(FlowViewsRepository.ViewState.Properties.viewContainers)) {
viewContainersSettings = new ReferencesTableSettings(viewState, FlowPackage.eINSTANCE.getViewState_ViewContainers());
viewStatePart.initViewContainers(viewContainersSettings);
}
if (isAccessible(FlowViewsRepository.ViewState.Properties.actions)) {
viewStatePart.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.ViewState.Properties.viewContainers)) {
viewStatePart.addFilterToViewContainers(new EObjectFilter(ViewPackage.Literals.VIEW_CONTAINER));
// Start of user code for additional businessfilters for viewContainers
// 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.referencestable.ReferencesTableSettings in project InformationSystem by ObeoNetwork.
the class ViewElementViewElementPropertiesEditionComponent 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 ViewElement viewElement = (ViewElement) elt;
final ViewElementPropertiesEditionPart viewElementPart = (ViewElementPropertiesEditionPart) editingPart;
// init values
if (isAccessible(ViewViewsRepository.ViewElement.Properties.description))
viewElementPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, viewElement.getDescription()));
if (isAccessible(ViewViewsRepository.ViewElement.Properties.name))
viewElementPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, viewElement.getName()));
if (isAccessible(ViewViewsRepository.ViewElement.Properties.widget)) {
// init part
widgetSettings = new EObjectFlatComboSettings(viewElement, ViewPackage.eINSTANCE.getAbstractViewElement_Widget());
viewElementPart.initWidget(widgetSettings);
// set the button mode
viewElementPart.setWidgetButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.actions)) {
actionsSettings = new ReferencesTableSettings(viewElement, ViewPackage.eINSTANCE.getAbstractViewElement_Actions());
viewElementPart.initActions(actionsSettings);
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.events)) {
eventsSettings = new ReferencesTableSettings(viewElement, ViewPackage.eINSTANCE.getAbstractViewElement_Events());
viewElementPart.initEvents(eventsSettings);
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.label))
viewElementPart.setLabel(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, viewElement.getLabel()));
if (isAccessible(ViewViewsRepository.ViewElement.Properties.required)) {
viewElementPart.setRequired(viewElement.isRequired());
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.type)) {
// init part
typeSettings = new EObjectFlatComboSettings(viewElement, ViewPackage.eINSTANCE.getViewElement_Type());
viewElementPart.initType(typeSettings);
// set the button mode
viewElementPart.setTypeButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.widget)) {
viewElementPart.addFilterToWidget(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 Widget);
}
});
// Start of user code for additional businessfilters for widget
// End of user code
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.actions)) {
viewElementPart.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 ViewAction);
}
});
// Start of user code for additional businessfilters for actions
// End of user code
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.events)) {
viewElementPart.addFilterToEvents(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 ViewEvent);
}
});
// Start of user code for additional businessfilters for events
// End of user code
}
if (isAccessible(ViewViewsRepository.ViewElement.Properties.type)) {
viewElementPart.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 Type);
}
});
// 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.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings 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.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings 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.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings 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);
}
Aggregations