Java 类org.eclipse.emf.ecore.util.Diagnostician 实例源码

项目:SimQRI    文件:PoissonPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (MetamodelViewsRepository.Poisson.Properties.interval == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(MetamodelPackage.eINSTANCE.getPoisson_Interval().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(MetamodelPackage.eINSTANCE.getPoisson_Interval().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:SimQRI    文件:ScalarPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (MetamodelViewsRepository.Scalar.Properties.value == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(MetamodelPackage.eINSTANCE.getScalar_Value().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(MetamodelPackage.eINSTANCE.getScalar_Value().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:SimQRI    文件:ModelPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (MetamodelViewsRepository.Model.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(MetamodelPackage.eINSTANCE.getModel_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(MetamodelPackage.eINSTANCE.getModel_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:neoscada    文件:ExporterProcessor.java   
/**
 * Validates a object instance and its children using the EMF core validator
 * API.
 *
 * @param element
 *            the element to validate
 * @param label
 *            the type label of the element
 * @throws IllegalStateException
 *             if validation errors are encountered
 */
protected static void validateDevice ( final EObject object, final String label )
{
    final Diagnostic diag = Diagnostician.INSTANCE.validate ( object );
    if ( diag.getSeverity () == Diagnostic.ERROR )
    {
        final StringBuilder sb = new StringBuilder ( "Invalid " + label );
        for ( final Diagnostic child : diag.getChildren () )
        {
            if ( child.getSeverity () == Diagnostic.ERROR )
            {
                sb.append ( System.lineSeparator () );
                sb.append ( child.getMessage () );
            }
        }
        throw new IllegalStateException ( sb.toString () );
    }
}
项目:neoscada    文件:ModbusExporterProcessor.java   
/**
 * Validates a ModbusExporterDevice instance using the EMF core validator
 * API. The
 * contained ModbusExporterItems are also validated.
 * 
 * @param device
 *            the ModbusExporterDevice to validate
 * @throws IllegalStateException
 *             if validation errors are encountered
 */
private void validateDevice ( final ModbusExporterDevice device )
{
    // Also validates contained ModbusExporterItems
    final Diagnostic diag = Diagnostician.INSTANCE.validate ( device );
    if ( diag.getSeverity () == Diagnostic.ERROR )
    {
        String msg = "Invalid Modbus Exporter Device";
        for ( final Diagnostic child : diag.getChildren () )
        {
            if ( child.getSeverity () == Diagnostic.ERROR )
            {
                msg += "\n" + child.getMessage (); //$NON-NLS-1$
            }
        }
        throw new IllegalStateException ( msg );
    }
}
项目:time4sys    文件:ResourceServicePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:UsageTypedAmountTimingPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.Timing.TimingProperties.execTime == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getUsageTypedAmount_ExecTime().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getUsageTypedAmount_ExecTime().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:UsageDemandPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.event == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getUsageDemand_Event().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getUsageDemand_Event().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ResourceInstancePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ResourceInterfacePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:TimerResourceTimingPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.Timing.TimingProperties.duration == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getTimerResource_Duration().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getTimerResource_Duration().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ProtectionParameterGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:AccessControlPolicyPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SchedulingPolicyGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ResourceControlPolicyPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ResourcePackagePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ReferencePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GqamViewsRepository.General.Properties.referenceName == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GqamPackage.eINSTANCE.getReference_ReferenceName().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GqamPackage.eINSTANCE.getReference_ReferenceName().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:WorkloadEventPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GqamViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:PeriodicPatternGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GqamViewsRepository.General.Properties.occurences == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GqamPackage.eINSTANCE.getPeriodicPattern_Occurences().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GqamPackage.eINSTANCE.getPeriodicPattern_Occurences().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:BehaviorScenarioGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GqamViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:PrecedenceRelationPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (GqamViewsRepository.General.Properties.connectorKind == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GqamPackage.eINSTANCE.getPrecedenceRelation_ConnectorKind().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GqamPackage.eINSTANCE.getPrecedenceRelation_ConnectorKind().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:InputPortPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.InputPort.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:OutputStimulusPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.OutputStimulus.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:RequiredSchedulingParameterPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.RequiredSchedulingParameter.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:MutualExclusionResourcePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.MutualExclusionResource.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ProtectionProtocolPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.ProtectionProtocol.Properties.protocolName == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getProtectionProtocol_ProtocolName().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getProtectionProtocol_ProtocolName().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:InputStimulusPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.InputStimulus.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:OutputPortPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.OutputPort.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ResultContainerPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.ResultContainer.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ConstraintContainerPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.ConstraintContainer.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:RequiredProtectionParameterPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.RequiredProtectionParameter.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:ProtectionParameterValuePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.ProtectionParameterValue.Properties.value == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getProtectionParameterValue_Value().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getProtectionParameterValue_Value().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SchedulerParameterValuePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (AnalysisViewsRepository.SchedulerParameterValue.Properties.value == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getSchedulerParameterValue_Value().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getSchedulerParameterValue_Value().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SoftwarePortOtherPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (SrmViewsRepository.Other.Properties.packetSize == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getCommunicationEndPoint_PacketSize().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getCommunicationEndPoint_PacketSize().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SoftwareInterfacePackagePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (SrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SoftwareInterfaceGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (SrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SoftwarePortGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (SrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SoftwareServicePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (SrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:DeviceBrokerTimingPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (SrmViewsRepository.Timing.Properties.accessPolicy == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(SrmPackage.eINSTANCE.getDeviceBroker_AccessPolicy().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(SrmPackage.eINSTANCE.getDeviceBroker_AccessPolicy().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}
项目:time4sys    文件:SoftwareResourcePackagePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
    Diagnostic ret = Diagnostic.OK_INSTANCE;
    if (event.getNewValue() != null) {
        try {
            if (SrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
                Object newValue = event.getNewValue();
                if (newValue instanceof String) {
                    newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
                }
                ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
            }
        } catch (IllegalArgumentException iae) {
            ret = BasicDiagnostic.toDiagnostic(iae);
        } catch (WrappedException we) {
            ret = BasicDiagnostic.toDiagnostic(we);
        }
    }
    return ret;
}