Java Code Examples for org.eclipse.emf.common.notify.Notification#getEventType()

The following examples show how to use org.eclipse.emf.common.notify.Notification#getEventType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TinkerforgeBinding.java    From openhab1-addons with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * Adds a listener {@link EContentAdapter} to the {@link Ecosystem}. The listener handles updated
 * sensor values and posts them to the openhab eventbus by
 * {@link #processTFDeviceValues(Notification) processTFDeviceValues}. Furthermore the addition
 * and removal of devices is handled by {@link #initializeTFDevices(Notification)
 * initializeTFDevices}.
 *
 * @param tinkerforgeEcosystem The EMF Ecosystem object.
 */
private void listen2Model(Ecosystem tinkerforgeEcosystem) {
    EContentAdapter modelAdapter = new EContentAdapter() {
        @Override
        public void notifyChanged(Notification notification) {
            super.notifyChanged(notification);
            logger.debug("TinkerforgeNotifier was notified");
            if (notification.getEventType() == Notification.ADD
                    || notification.getEventType() == Notification.ADD_MANY
                    || notification.getEventType() == Notification.REMOVE
                    || notification.getEventType() == Notification.REMOVE_MANY) {
                initializeTFDevices(notification);
            } else {
                processTFDeviceValues(notification);
            }
        }

    };
    tinkerforgeEcosystem.eAdapters().add(modelAdapter);
}
 
Example 2
Source File: AbstractSCTResource.java    From statecharts with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public void notifyChanged(Notification msg) {
	super.notifyChanged(msg);
	if (isSerializerEnabled()) {
		if (isLoading() || isParsing || isLinking || isSerializing) {
			return;
		}
		if (msg.getEventType() == Notification.REMOVING_ADAPTER || msg.getEventType() == Notification.RESOLVE) {
			return;
		}
		Object notifier = msg.getNotifier();
		if (notifier instanceof EObject) {
			EObject eObject = (EObject) notifier;
			SpecificationElement container = EcoreUtil2.getContainerOfType(eObject, SpecificationElement.class);
			if (container != null) {
				serializeSpecificationElement(container);
			}
		}
	}
}
 
Example 3
Source File: IntermediateThrowMessageEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 4
Source File: EndEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 5
Source File: StartTimerEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 6
Source File: CatchLinkEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 7
Source File: CatchLinkEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 8
Source File: EndErrorEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 9
Source File: BoundaryMessageEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 10
Source File: IntermediateErrorCatchEventLabel3EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 11
Source File: EndTerminatedEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 12
Source File: ScriptModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
protected void customENotify ( final Notification notification )
{
    if ( notification.getFeature ().equals ( ComponentPackage.Literals.SCRIPT_MODULE__INPUTS ) )
    {
        super.eNotify ( new org.eclipse.emf.ecore.impl.ENotificationImpl ( this, notification.getEventType (), ComponentPackage.SCRIPT_MODULE__KNOWN_INPUTS, notification.getOldValue (), notification.getNewValue (), notification.getPosition (), notification.wasSet () ) );
    }
    if ( notification.getFeature ().equals ( ComponentPackage.Literals.SCRIPT_MODULE__OUTPUTS ) )
    {
        super.eNotify ( new org.eclipse.emf.ecore.impl.ENotificationImpl ( this, notification.getEventType (), ComponentPackage.SCRIPT_MODULE__KNOWN_OUTPUTS, notification.getOldValue (), notification.getNewValue (), notification.getPosition (), notification.wasSet () ) );
    }
    super.eNotify ( notification );
}
 
Example 13
Source File: EndErrorEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 14
Source File: SimpleAttributeResolver.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void notifyChanged(final Notification notification) {
	if (!notification.isTouch() && Notification.SET == notification.getEventType()) {
		final Object feature = notification.getFeature();
		if (feature != null) {
			if (resolver.attributeName.equals(((ENamedElement) feature).getName())) {
				resolver.valueCache.discard((EObject) notification.getNotifier());
				((EObject) notification.getNotifier()).eAdapters().remove(this);
			}
		}

	}
}
 
Example 15
Source File: IntermediateCatchSignalEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 16
Source File: IntermediateThrowMessageEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 17
Source File: ANDGatewayLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 18
Source File: ThrowLinkEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 19
Source File: EndMessageEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}
 
Example 20
Source File: IntermediateErrorCatchEventLabel6EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void handleNotificationEvent(Notification event) {
	Object feature = event.getFeature();
	if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
		Integer c = (Integer) event.getNewValue();
		setFontColor(DiagramColorRegistry.getInstance().getColor(c));
	} else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
		refreshUnderline();
	} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
		refreshStrikeThrough();
	} else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
			|| NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
		refreshFont();
	} else {
		if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
			refreshLabel();
		}
		if (getParser() instanceof ISemanticParser) {
			ISemanticParser modelParser = (ISemanticParser) getParser();
			if (modelParser.areSemanticElementsAffected(null, event)) {
				removeSemanticListeners();
				if (resolveSemanticElement() != null) {
					addSemanticListeners();
				}
				refreshLabel();
			}
		}
	}
	//if 'to' link changed
	if (event.getEventType() == Notification.SET && feature.equals(ProcessPackage.Literals.THROW_LINK_EVENT__TO)) {
		refreshLabel();
	}
	super.handleNotificationEvent(event);
}