use of org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings in project InformationSystem by ObeoNetwork.
the class NativeTypesLibraryPropertiesEditionComponent 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 NativeTypesLibrary nativeTypesLibrary = (NativeTypesLibrary) elt;
final NativeTypesLibraryPropertiesEditionPart nativeTypesLibraryPart = (NativeTypesLibraryPropertiesEditionPart) editingPart;
// init values
if (isAccessible(TypeslibraryViewsRepository.NativeTypesLibrary.Properties.name))
nativeTypesLibraryPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, nativeTypesLibrary.getName()));
if (isAccessible(TypeslibraryViewsRepository.NativeTypesLibrary.Properties.nativeTypes)) {
nativeTypesSettings = new ReferencesTableSettings(nativeTypesLibrary, TypesLibraryPackage.eINSTANCE.getNativeTypesLibrary_NativeTypes());
nativeTypesLibraryPart.initNativeTypes(nativeTypesSettings);
}
if (isAccessible(TypeslibraryViewsRepository.NativeTypesLibrary.Properties.nativeTypes)) {
nativeTypesLibraryPart.addFilterToNativeTypes(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 NativeType);
}
});
// Start of user code for additional businessfilters for nativeTypes
// 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 ComplexNamedTypePropertiesEditionComponent 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 ComplexNamedType complexNamedType = (ComplexNamedType) elt;
final ComplexNamedTypePropertiesEditionPart complexNamedTypePart = (ComplexNamedTypePropertiesEditionPart) editingPart;
// init values
if (isAccessible(TypeslibraryViewsRepository.ComplexNamedType.Properties.name))
complexNamedTypePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, complexNamedType.getName()));
if (isAccessible(TypeslibraryViewsRepository.ComplexNamedType.Properties.types)) {
typesSettings = new ReferencesTableSettings(complexNamedType, TypesLibraryPackage.eINSTANCE.getComplexNamedType_Types());
complexNamedTypePart.initTypes(typesSettings);
}
if (isAccessible(TypeslibraryViewsRepository.ComplexNamedType.Properties.types)) {
complexNamedTypePart.addFilterToTypes(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 UserDefinedType);
}
});
// Start of user code for additional businessfilters for types
// 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 AbortNodeAbortNodePropertiesEditionComponent 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 AbortNode abortNode = (AbortNode) elt;
final AbortNodePropertiesEditionPart abortNodePart = (AbortNodePropertiesEditionPart) editingPart;
// init values
if (isAccessible(GraalViewsRepository.AbortNode.Properties.description))
abortNodePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, abortNode.getDescription()));
if (isAccessible(GraalViewsRepository.AbortNode.Properties.outgoingTransitions)) {
outgoingTransitionsSettings = new ReferencesTableSettings(abortNode, GraalPackage.eINSTANCE.getNode_OutgoingTransitions());
abortNodePart.initOutgoingTransitions(outgoingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.AbortNode.Properties.incomingTransitions)) {
incomingTransitionsSettings = new ReferencesTableSettings(abortNode, GraalPackage.eINSTANCE.getNode_IncomingTransitions());
abortNodePart.initIncomingTransitions(incomingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.AbortNode.Properties.outgoingTransitions)) {
abortNodePart.addFilterToOutgoingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for outgoingTransitions
// End of user code
}
if (isAccessible(GraalViewsRepository.AbortNode.Properties.incomingTransitions)) {
abortNodePart.addFilterToIncomingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for incomingTransitions
// 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 CategoryPropertiesEditionComponent 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 Category category = (Category) elt;
final CategoryPropertiesEditionPart categoryPart = (CategoryPropertiesEditionPart) editingPart;
// init values
if (isAccessible(RequirementViewsRepository.Category.Category_.id))
categoryPart.setId(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, category.getId()));
if (isAccessible(RequirementViewsRepository.Category.Category_.name))
categoryPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, category.getName()));
if (isAccessible(RequirementViewsRepository.Category.Category_.requirements)) {
requirementsSettings = new ReferencesTableSettings(category, RequirementPackage.eINSTANCE.getCategory_Requirements());
categoryPart.initRequirements(requirementsSettings);
}
if (isAccessible(RequirementViewsRepository.Category.Category_.subCategories)) {
subCategoriesSettings = new ReferencesTableSettings(category, RequirementPackage.eINSTANCE.getCategory_SubCategories());
categoryPart.initSubCategories(subCategoriesSettings);
}
if (isAccessible(RequirementViewsRepository.Category.Category_.requirements)) {
categoryPart.addFilterToRequirements(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 Requirement);
}
});
// Start of user code for additional businessfilters for requirements
// End of user code
}
if (isAccessible(RequirementViewsRepository.Category.Category_.subCategories)) {
categoryPart.addFilterToSubCategories(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 Category);
}
});
// Start of user code for additional businessfilters for subCategories
// 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 RequirementAdvancedPropertiesEditionComponent 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 Requirement requirement = (Requirement) elt;
final AdvancedPropertiesEditionPart advancedPart = (AdvancedPropertiesEditionPart) editingPart;
// init values
if (isAccessible(RequirementViewsRepository.Advanced.rationale))
advancedPart.setRationale(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, requirement.getRationale()));
if (isAccessible(RequirementViewsRepository.Advanced.acceptanceCriteria))
advancedPart.setAcceptanceCriteria(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, requirement.getAcceptanceCriteria()));
if (isAccessible(RequirementViewsRepository.Advanced.referencedObject)) {
referencedObjectSettings = new ReferencesTableSettings(requirement, RequirementPackage.eINSTANCE.getRequirement_ReferencedObject());
advancedPart.initReferencedObject(referencedObjectSettings);
}
if (isAccessible(RequirementViewsRepository.Advanced.referencedObject)) {
advancedPart.addFilterToReferencedObject(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) {
if (element instanceof EObject)
return (!advancedPart.isContainedInReferencedObjectTable((EObject) element));
return element instanceof String && element.equals("");
}
});
advancedPart.addFilterToReferencedObject(new EObjectStrictFilter(EcorePackage.Literals.EOBJECT));
// Start of user code for additional businessfilters for referencedObject
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations