Java Code Examples for org.eclipse.emf.common.notify.NotificationChain#dispatch()

The following examples show how to use org.eclipse.emf.common.notify.NotificationChain#dispatch() . 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: GNodeImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setSize(GDimension newSize) {
	if (newSize != size) {
		NotificationChain msgs = null;
		if (size != null)
			msgs = ((InternalEObject) size).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__SIZE,
					null, msgs);
		if (newSize != null)
			msgs = ((InternalEObject) newSize).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__SIZE,
					null, msgs);
		msgs = basicSetSize(newSize, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GNODE__SIZE, newSize, newSize));
}
 
Example 2
Source File: GModelRootImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setParent(GModelElement newParent) {
	if (newParent != eInternalContainer()
			|| (eContainerFeatureID() != GraphPackage.GMODEL_ROOT__PARENT && newParent != null)) {
		if (EcoreUtil.isAncestor(this, newParent))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newParent != null)
			msgs = ((InternalEObject) newParent).eInverseAdd(this, GraphPackage.GMODEL_ELEMENT__CHILDREN,
					GModelElement.class, msgs);
		msgs = basicSetParent(newParent, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GMODEL_ROOT__PARENT, newParent,
				newParent));
}
 
Example 3
Source File: Cursor.java    From nebula with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public void setTimeline(ITimeline newTimeline) {
	if (newTimeline != eInternalContainer() || (eContainerFeatureID() != ITimelinePackage.CURSOR__TIMELINE && newTimeline != null)) {
		if (EcoreUtil.isAncestor(this, newTimeline))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newTimeline != null)
			msgs = ((InternalEObject)newTimeline).eInverseAdd(this, ITimelinePackage.TIMELINE__CURSORS, ITimeline.class, msgs);
		msgs = basicSetTimeline(newTimeline, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, ITimelinePackage.CURSOR__TIMELINE, newTimeline, newTimeline));
}
 
Example 4
Source File: GModelRootImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setCanvasBounds(GBounds newCanvasBounds) {
	if (newCanvasBounds != canvasBounds) {
		NotificationChain msgs = null;
		if (canvasBounds != null)
			msgs = ((InternalEObject) canvasBounds).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GMODEL_ROOT__CANVAS_BOUNDS, null, msgs);
		if (newCanvasBounds != null)
			msgs = ((InternalEObject) newCanvasBounds).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GMODEL_ROOT__CANVAS_BOUNDS, null, msgs);
		msgs = basicSetCanvasBounds(newCanvasBounds, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GMODEL_ROOT__CANVAS_BOUNDS,
				newCanvasBounds, newCanvasBounds));
}
 
Example 5
Source File: GIssueMarkerImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setParent(GModelElement newParent) {
	if (newParent != eInternalContainer()
			|| (eContainerFeatureID() != GraphPackage.GISSUE_MARKER__PARENT && newParent != null)) {
		if (EcoreUtil.isAncestor(this, newParent))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newParent != null)
			msgs = ((InternalEObject) newParent).eInverseAdd(this, GraphPackage.GMODEL_ELEMENT__CHILDREN,
					GModelElement.class, msgs);
		msgs = basicSetParent(newParent, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GISSUE_MARKER__PARENT, newParent,
				newParent));
}
 
Example 6
Source File: GGraphImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setLayoutOptions(GLayoutOptions newLayoutOptions) {
	if (newLayoutOptions != layoutOptions) {
		NotificationChain msgs = null;
		if (layoutOptions != null)
			msgs = ((InternalEObject) layoutOptions).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GGRAPH__LAYOUT_OPTIONS, null, msgs);
		if (newLayoutOptions != null)
			msgs = ((InternalEObject) newLayoutOptions).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GGRAPH__LAYOUT_OPTIONS, null, msgs);
		msgs = basicSetLayoutOptions(newLayoutOptions, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GGRAPH__LAYOUT_OPTIONS, newLayoutOptions,
				newLayoutOptions));
}
 
Example 7
Source File: GGraphImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setSize(GDimension newSize) {
	if (newSize != size) {
		NotificationChain msgs = null;
		if (size != null)
			msgs = ((InternalEObject) size).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphPackage.GGRAPH__SIZE,
					null, msgs);
		if (newSize != null)
			msgs = ((InternalEObject) newSize).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphPackage.GGRAPH__SIZE,
					null, msgs);
		msgs = basicSetSize(newSize, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GGRAPH__SIZE, newSize, newSize));
}
 
Example 8
Source File: GGraphImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setPosition(GPoint newPosition) {
	if (newPosition != position) {
		NotificationChain msgs = null;
		if (position != null)
			msgs = ((InternalEObject) position).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GGRAPH__POSITION, null, msgs);
		if (newPosition != null)
			msgs = ((InternalEObject) newPosition).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GGRAPH__POSITION, null, msgs);
		msgs = basicSetPosition(newPosition, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GGRAPH__POSITION, newPosition,
				newPosition));
}
 
Example 9
Source File: GNodeImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setLayoutOptions(GLayoutOptions newLayoutOptions) {
	if (newLayoutOptions != layoutOptions) {
		NotificationChain msgs = null;
		if (layoutOptions != null)
			msgs = ((InternalEObject) layoutOptions).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__LAYOUT_OPTIONS, null, msgs);
		if (newLayoutOptions != null)
			msgs = ((InternalEObject) newLayoutOptions).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__LAYOUT_OPTIONS, null, msgs);
		msgs = basicSetLayoutOptions(newLayoutOptions, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GNODE__LAYOUT_OPTIONS, newLayoutOptions,
				newLayoutOptions));
}
 
Example 10
Source File: GNodeImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setEdgePlacement(GEdgePlacement newEdgePlacement) {
	if (newEdgePlacement != edgePlacement) {
		NotificationChain msgs = null;
		if (edgePlacement != null)
			msgs = ((InternalEObject) edgePlacement).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__EDGE_PLACEMENT, null, msgs);
		if (newEdgePlacement != null)
			msgs = ((InternalEObject) newEdgePlacement).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__EDGE_PLACEMENT, null, msgs);
		msgs = basicSetEdgePlacement(newEdgePlacement, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GNODE__EDGE_PLACEMENT, newEdgePlacement,
				newEdgePlacement));
}
 
Example 11
Source File: GCompartmentImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setPosition(GPoint newPosition) {
	if (newPosition != position) {
		NotificationChain msgs = null;
		if (position != null)
			msgs = ((InternalEObject) position).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GCOMPARTMENT__POSITION, null, msgs);
		if (newPosition != null)
			msgs = ((InternalEObject) newPosition).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GCOMPARTMENT__POSITION, null, msgs);
		msgs = basicSetPosition(newPosition, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GCOMPARTMENT__POSITION, newPosition,
				newPosition));
}
 
Example 12
Source File: GNodeImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setPosition(GPoint newPosition) {
	if (newPosition != position) {
		NotificationChain msgs = null;
		if (position != null)
			msgs = ((InternalEObject) position).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__POSITION, null, msgs);
		if (newPosition != null)
			msgs = ((InternalEObject) newPosition).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GNODE__POSITION, null, msgs);
		msgs = basicSetPosition(newPosition, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GNODE__POSITION, newPosition,
				newPosition));
}
 
Example 13
Source File: GButtonImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setParent(GModelElement newParent) {
	if (newParent != eInternalContainer()
			|| (eContainerFeatureID() != GraphPackage.GBUTTON__PARENT && newParent != null)) {
		if (EcoreUtil.isAncestor(this, newParent))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newParent != null)
			msgs = ((InternalEObject) newParent).eInverseAdd(this, GraphPackage.GMODEL_ELEMENT__CHILDREN,
					GModelElement.class, msgs);
		msgs = basicSetParent(newParent, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GBUTTON__PARENT, newParent, newParent));
}
 
Example 14
Source File: GPortImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setParent(GModelElement newParent) {
	if (newParent != eInternalContainer()
			|| (eContainerFeatureID() != GraphPackage.GPORT__PARENT && newParent != null)) {
		if (EcoreUtil.isAncestor(this, newParent))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newParent != null)
			msgs = ((InternalEObject) newParent).eInverseAdd(this, GraphPackage.GMODEL_ELEMENT__CHILDREN,
					GModelElement.class, msgs);
		msgs = basicSetParent(newParent, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GPORT__PARENT, newParent, newParent));
}
 
Example 15
Source File: GLabelImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setSize(GDimension newSize) {
	if (newSize != size) {
		NotificationChain msgs = null;
		if (size != null)
			msgs = ((InternalEObject) size).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphPackage.GLABEL__SIZE,
					null, msgs);
		if (newSize != null)
			msgs = ((InternalEObject) newSize).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphPackage.GLABEL__SIZE,
					null, msgs);
		msgs = basicSetSize(newSize, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GLABEL__SIZE, newSize, newSize));
}
 
Example 16
Source File: GLabelImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setPosition(GPoint newPosition) {
	if (newPosition != position) {
		NotificationChain msgs = null;
		if (position != null)
			msgs = ((InternalEObject) position).eInverseRemove(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GLABEL__POSITION, null, msgs);
		if (newPosition != null)
			msgs = ((InternalEObject) newPosition).eInverseAdd(this,
					EOPPOSITE_FEATURE_BASE - GraphPackage.GLABEL__POSITION, null, msgs);
		msgs = basicSetPosition(newPosition, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GLABEL__POSITION, newPosition,
				newPosition));
}
 
Example 17
Source File: GLabelImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setParent(GModelElement newParent) {
	if (newParent != eInternalContainer()
			|| (eContainerFeatureID() != GraphPackage.GLABEL__PARENT && newParent != null)) {
		if (EcoreUtil.isAncestor(this, newParent))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newParent != null)
			msgs = ((InternalEObject) newParent).eInverseAdd(this, GraphPackage.GMODEL_ELEMENT__CHILDREN,
					GModelElement.class, msgs);
		msgs = basicSetParent(newParent, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GLABEL__PARENT, newParent, newParent));
}
 
Example 18
Source File: Lane.java    From nebula with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
@Override
public void setTrack(ITrack newTrack) {
	if ((newTrack != eInternalContainer()) || ((eContainerFeatureID() != ITimelinePackage.LANE__TRACK) && (newTrack != null))) {
		if (EcoreUtil.isAncestor(this, newTrack))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newTrack != null)
			msgs = ((InternalEObject) newTrack).eInverseAdd(this, ITimelinePackage.TRACK__LANES, ITrack.class, msgs);
		msgs = basicSetTrack(newTrack, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, ITimelinePackage.LANE__TRACK, newTrack, newTrack));
}
 
Example 19
Source File: TimelineEvent.java    From nebula with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public void setLane(ILane newLane) {
	if (newLane != eInternalContainer() || (eContainerFeatureID() != ITimelinePackage.TIMELINE_EVENT__LANE && newLane != null)) {
		if (EcoreUtil.isAncestor(this, newLane))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newLane != null)
			msgs = ((InternalEObject)newLane).eInverseAdd(this, ITimelinePackage.LANE__TIME_EVENTS, ILane.class, msgs);
		msgs = basicSetLane(newLane, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, ITimelinePackage.TIMELINE_EVENT__LANE, newLane, newLane));
}
 
Example 20
Source File: GEdgeImpl.java    From graphical-lsp with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setParent(GModelElement newParent) {
	if (newParent != eInternalContainer()
			|| (eContainerFeatureID() != GraphPackage.GEDGE__PARENT && newParent != null)) {
		if (EcoreUtil.isAncestor(this, newParent))
			throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
		NotificationChain msgs = null;
		if (eInternalContainer() != null)
			msgs = eBasicRemoveFromContainer(msgs);
		if (newParent != null)
			msgs = ((InternalEObject) newParent).eInverseAdd(this, GraphPackage.GMODEL_ELEMENT__CHILDREN,
					GModelElement.class, msgs);
		msgs = basicSetParent(newParent, msgs);
		if (msgs != null)
			msgs.dispatch();
	} else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GEDGE__PARENT, newParent, newParent));
}