/** * Returns the '<em><b>Item Type</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param literal the literal. * @return the matching enumerator or <code>null</code>. * @generated */ public static ItemType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ItemType result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ItemType createItemTypeFromString(EDataType eDataType, String initialValue) { ItemType result = ItemType.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return result; }
/** * Returns the '<em><b>Item Type</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param name the name. * @return the matching enumerator or <code>null</code>. * @generated */ public static ItemType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ItemType result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; }
/** * Returns the '<em><b>Item Type</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param literal the literal. * @return the matching enumerator or <code>null</code>. * @generated */ public static ItemType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ItemType result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @since 1.0 * @generated */ public ItemType createItemTypeFromString(EDataType eDataType, String initialValue) { ItemType result = ItemType.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return result; }
/** * Returns the '<em><b>Item Type</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param name the name. * @return the matching enumerator or <code>null</code>. * @generated */ public static ItemType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ItemType result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; }
private void hookCheckListener() { if (model.getType() != ItemType.CHECK) { return; } Object obj = model.getTransientData().get(ItemType.CHECK.toString()); if (obj instanceof IContextFunction) { IEclipseContext context = getContext(model); IEclipseContext staticContext = getStaticContext(null); staticContext.set(MPart.class, context.get(MPart.class)); staticContext.set(WW_SUPPORT, context.get(WW_SUPPORT)); IContextFunction func = (IContextFunction) obj; obj = func.compute(staticContext, null); if (obj != null) { model.getTransientData().put(DISPOSABLE_CHECK, obj); } } }
private void hookCheckListener() { if (getModel().getType() != ItemType.CHECK) { return; } Object obj = getModel().getTransientData().get(ItemType.CHECK.toString()); if (obj instanceof IContextFunction) { IEclipseContext context = getContext(getModel()); IEclipseContext staticContext = getStaticContext(null); staticContext.set(MPart.class, context.get(MPart.class)); staticContext.set(WW_SUPPORT, context.get(WW_SUPPORT)); IContextFunction func = (IContextFunction) obj; obj = func.compute(staticContext, null); if (obj != null) { getModel().getTransientData().put(DISPOSABLE, obj); } } }
IContextFunction generator = createToggleFunction(element); if (generator != null) { item.getTransientData().put(ItemType.CHECK.toString(), generator);