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

The following examples show how to use org.eclipse.emf.common.notify.Notification#getFeatureID() . 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: ViewItemProvider.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged ( Notification notification )
{
    updateChildren ( notification );

    switch ( notification.getFeatureID ( View.class ) )
    {
        case DetailViewPackage.VIEW__TAB_STYLE:
        case DetailViewPackage.VIEW__WRITE_DIALOG_ENABLED:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), false, true ) );
            return;
        case DetailViewPackage.VIEW__HEADER_COMPONENT:
        case DetailViewPackage.VIEW__GROUPS:
        case DetailViewPackage.VIEW__HIDDEN_COMPONENT:
        case DetailViewPackage.VIEW__SCRIPT_MODULE:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), true, false ) );
            return;
    }
    super.notifyChanged ( notification );
}
 
Example 2
Source File: MovingAverageModuleItemProvider.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged ( Notification notification )
{
    updateChildren ( notification );

    switch ( notification.getFeatureID ( MovingAverageModule.class ) )
    {
        case ComponentPackage.MOVING_AVERAGE_MODULE__NULL_RANGE:
        case ComponentPackage.MOVING_AVERAGE_MODULE__RANGE:
        case ComponentPackage.MOVING_AVERAGE_MODULE__TRIGGER:
        case ComponentPackage.MOVING_AVERAGE_MODULE__TRIGGER_ONLY:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), false, true ) );
            return;
    }
    super.notifyChanged ( notification );
}
 
Example 3
Source File: ProfileItemProvider.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged ( Notification notification )
{
    updateChildren ( notification );

    switch ( notification.getFeatureID ( Profile.class ) )
    {
        case RecipePackage.PROFILE__NAME:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), false, true ) );
            return;
        case RecipePackage.PROFILE__PROPERTIES:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), true, false ) );
            return;
    }
    super.notifyChanged ( notification );
}
 
Example 4
Source File: IFMLWindowItemProvider.java    From ifml-editor with MIT License 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(IFMLWindow.class)) {
		case ExtensionsPackage.IFML_WINDOW__IS_MODAL:
		case ExtensionsPackage.IFML_WINDOW__IS_NEW_WINDOW:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
			return;
	}
	super.notifyChanged(notification);
}
 
Example 5
Source File: EipEditor.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
@Override
public void notifyChanged(Notification notification) {
   if (notification.getNotifier() instanceof Resource) {
      switch (notification.getFeatureID(Resource.class)) {
         case Resource.RESOURCE__IS_LOADED:
         case Resource.RESOURCE__ERRORS:
         case Resource.RESOURCE__WARNINGS: {
            Resource resource = (Resource)notification.getNotifier();
            Diagnostic diagnostic = analyzeResourceProblems(resource, null);
            if (diagnostic.getSeverity() != Diagnostic.OK) {
               resourceToDiagnosticMap.put(resource, diagnostic);
            }
            else {
               resourceToDiagnosticMap.remove(resource);
            }

            if (updateProblemIndication) {
               getSite().getShell().getDisplay().asyncExec
                  (new Runnable() {
                      public void run() {
                         updateProblemIndication();
                      }
                   });
            }
            break;
         }
      }
   }
   else {
      super.notifyChanged(notification);
   }
}
 
Example 6
Source File: StreamItemProvider.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(Stream.class)) {
		case CrossflowPackage.STREAM__NAME:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
			return;
	}
	super.notifyChanged(notification);
}
 
Example 7
Source File: StatechartRootItemProvider.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
 * @generated
 */
 @Override
 public void notifyChanged(Notification notification)
 {
	updateChildren(notification);

	switch (notification.getFeatureID(StatechartRoot.class)) {
		case StextPackage.STATECHART_ROOT__DEF:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
			return;
	}
	super.notifyChanged(notification);
}
 
Example 8
Source File: LoadAverageConfigurationItemProvider.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged ( Notification notification )
{
    updateChildren ( notification );

    switch ( notification.getFeatureID ( LoadAverageConfiguration.class ) )
    {
        case ExecComponentsPackage.LOAD_AVERAGE_CONFIGURATION__PERIOD:
        case ExecComponentsPackage.LOAD_AVERAGE_CONFIGURATION__PATTERN:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), false, true ) );
            return;
    }
    super.notifyChanged ( notification );
}
 
Example 9
Source File: ViewElementItemProvider.java    From ifml-editor with MIT License 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(ViewElement.class)) {
		case CorePackage.VIEW_ELEMENT__VIEW_ELEMENT_EVENTS:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
			return;
	}
	super.notifyChanged(notification);
}
 
Example 10
Source File: StartBundleItemProvider.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged ( Notification notification )
{
    updateChildren ( notification );

    switch ( notification.getFeatureID ( StartBundle.class ) )
    {
        case ProfilePackage.START_BUNDLE__NAME:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), false, true ) );
            return;
    }
    super.notifyChanged ( notification );
}
 
Example 11
Source File: SimulationCalendarItemProvider.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * This handles model notifications by calling {@link #updateChildren} to update any cached
    * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public void notifyChanged(Notification notification) {
       updateChildren(notification);

       switch (notification.getFeatureID(SimulationCalendar.class)) {
           case SimulationPackage.SIMULATION_CALENDAR__DAYS_OF_WEEK:
               fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
               return;
       }
       super.notifyChanged(notification);
   }
 
Example 12
Source File: HiveDeviceItemProvider.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged ( Notification notification )
{
    updateChildren ( notification );

    switch ( notification.getFeatureID ( HiveDevice.class ) )
    {
        case IEC62541Package.HIVE_DEVICE__ID:
        case IEC62541Package.HIVE_DEVICE__SERVER_URL:
            fireNotifyChanged ( new ViewerNotification ( notification, notification.getNotifier (), false, true ) );
            return;
    }
    super.notifyChanged ( notification );
}
 
Example 13
Source File: CompositeProcessorItemProvider.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
   * This handles model notifications by calling {@link #updateChildren} to update any cached
   * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
   * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
   * @generated
   */
@Override
public void notifyChanged(Notification notification) {
     updateChildren(notification);

     switch (notification.getFeatureID(CompositeProcessor.class)) {
        case EipPackage.COMPOSITE_PROCESSOR__NAME:
           fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
           return;
        case EipPackage.COMPOSITE_PROCESSOR__OWNED_ENDPOINTS:
           fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
           return;
     }
     super.notifyChanged(notification);
  }
 
Example 14
Source File: DomainElementItemProvider.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(DomainElement.class)) {
		case BasePackage.DOMAIN_ELEMENT__DOMAIN_ID:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
			return;
	}
	super.notifyChanged(notification);
}
 
Example 15
Source File: FormItemProvider.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * This handles model notifications by calling {@link #updateChildren} to update any cached
    * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public void notifyChanged(Notification notification) {
       updateChildren(notification);

       switch (notification.getFeatureID(Form.class)) {
           case FormPackage.FORM__USE_DEFAULT_VALIDATOR:
           case FormPackage.FORM__BELOW:
           case FormPackage.FORM__NCOLUMN:
           case FormPackage.FORM__NLINE:
           case FormPackage.FORM__SHOW_PAGE_LABEL:
           case FormPackage.FORM__ALLOW_HTML_IN_PAGE_LABEL:
           case FormPackage.FORM__VERSION:
               fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
               return;
           case FormPackage.FORM__VALIDATORS:
           case FormPackage.FORM__STRING_ATTRIBUTES:
           case FormPackage.FORM__COLUMNS:
           case FormPackage.FORM__LINES:
           case FormPackage.FORM__WIDGETS:
           case FormPackage.FORM__PAGE_LABEL:
           case FormPackage.FORM__ACTIONS:
               fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
               return;
       }
       super.notifyChanged(notification);
   }
 
Example 16
Source File: TakeTransitionActionItemProvider.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * This handles model notifications by calling {@link #updateChildren} to update any cached
    * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public void notifyChanged(Notification notification) {
       updateChildren(notification);

       switch (notification.getFeatureID(TakeTransitionAction.class)) {
           case TransitionsPackage.TAKE_TRANSITION_ACTION__TAKE_TRANSITION:
               fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
               return;
       }
       super.notifyChanged(notification);
   }
 
Example 17
Source File: IFMLParameterItemProvider.java    From ifml-editor with MIT License 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(IFMLParameter.class)) {
		case CorePackage.IFML_PARAMETER__NAME:
		case CorePackage.IFML_PARAMETER__DIRECTION:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
			return;
	}
	super.notifyChanged(notification);
}
 
Example 18
Source File: OperationItemProvider.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * This handles model notifications by calling {@link #updateChildren} to update any cached
    * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public void notifyChanged(Notification notification) {
       updateChildren(notification);

       switch (notification.getFeatureID(Operation.class)) {
           case ExpressionPackage.OPERATION__LEFT_OPERAND:
           case ExpressionPackage.OPERATION__OPERATOR:
               fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
               return;
       }
       super.notifyChanged(notification);
   }
 
Example 19
Source File: IntegerDefinitionItemProvider.java    From M2Doc with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
    updateChildren(notification);

    switch (notification.getFeatureID(IntegerDefinition.class)) {
        case GenconfPackage.INTEGER_DEFINITION__VALUE:
            fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
            return;
    }
    super.notifyChanged(notification);
}
 
Example 20
Source File: ConfigurationEditor.java    From neoscada with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void notifyChanged ( Notification notification )
{
    if ( notification.getNotifier () instanceof Resource )
    {
        switch ( notification.getFeatureID ( Resource.class ) )
        {
            case Resource.RESOURCE__IS_LOADED:
            case Resource.RESOURCE__ERRORS:
            case Resource.RESOURCE__WARNINGS:
            {
                Resource resource = (Resource)notification.getNotifier ();
                Diagnostic diagnostic = analyzeResourceProblems ( resource, null );
                if ( diagnostic.getSeverity () != Diagnostic.OK )
                {
                    resourceToDiagnosticMap.put ( resource, diagnostic );
                }
                else
                {
                    resourceToDiagnosticMap.remove ( resource );
                }

                if ( updateProblemIndication )
                {
                    getSite ().getShell ().getDisplay ().asyncExec
                            ( new Runnable ()
                            {
                                public void run ()
                                {
                                    updateProblemIndication ();
                                }
                            } );
                }
                break;
            }
        }
    }
    else
    {
        super.notifyChanged ( notification );
    }
}