Java 类org.eclipse.emf.ecore.EcorePackage 实例源码

项目:time4sys    文件:SoftwareTimerResourceTimingPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
    SoftwareTimerResource softwareTimerResource = (SoftwareTimerResource)semanticObject;
    if (SrmViewsRepository.Timing.Properties.duration == event.getAffectedEditor()) {
        softwareTimerResource.setDuration((EEFConverterUtil.createFloatFromString(EcorePackage.Literals.EFLOAT, (String)event.getNewValue())));
    }
    if (SrmViewsRepository.Timing.Properties.isPeriodic == event.getAffectedEditor()) {
        softwareTimerResource.setIsPeriodic((Boolean)event.getNewValue());
    }
    if (SrmViewsRepository.Timing.Properties.durationElements == event.getAffectedEditor()) {
        if (event.getKind() == PropertiesEditionEvent.SET) {
            softwareTimerResource.getDurationElements().clear();
            softwareTimerResource.getDurationElements().addAll(((EList) event.getNewValue()));
        }
    }
}
项目:time4sys    文件:WorkloadEventPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
    WorkloadEvent workloadEvent = (WorkloadEvent)semanticObject;
    if (GqamViewsRepository.General.Properties.name == event.getAffectedEditor()) {
        workloadEvent.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
    }
    if (GqamViewsRepository.General.Properties.effect == event.getAffectedEditor()) {
        if (event.getKind() == PropertiesEditionEvent.SET) {
            effectSettings.setToReference((BehaviorScenario)event.getNewValue());
        } else if (event.getKind() == PropertiesEditionEvent.ADD) {
            BehaviorScenario eObject = GqamFactory.eINSTANCE.createBehaviorScenario();
            EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
            PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
            if (provider != null) {
                PropertiesEditingPolicy policy = provider.getPolicy(context);
                if (policy != null) {
                    policy.execute();
                }
            }
            effectSettings.setToReference(eObject);
        }
    }
}
项目:n4js    文件:TokenTypeRewriter.java   
private static void rewriteNumberLiterals(N4JSGrammarAccess ga,
        ImmutableMap.Builder<AbstractElement, Integer> builder) {
    for (ParserRule rule : GrammarUtil.allParserRules(ga.getGrammar())) {
        for (EObject obj : EcoreUtil2.eAllContents(rule.getAlternatives())) {
            if (obj instanceof Assignment) {
                Assignment assignment = (Assignment) obj;
                AbstractElement terminal = assignment.getTerminal();
                if (terminal instanceof RuleCall) {
                    AbstractRule calledRule = ((RuleCall) terminal).getRule();
                    EClassifier classifier = calledRule.getType().getClassifier();
                    if (classifier == EcorePackage.Literals.EBIG_DECIMAL) {
                        builder.put(assignment, NUMBER_LITERAL_TOKEN);
                    }
                }
            }
        }
    }
}
项目:n4js    文件:DomPackageImpl.java   
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 * 
 * <p>This method is used to initialize {@link DomPackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static DomPackage init() {
    if (isInited) return (DomPackage)EPackage.Registry.INSTANCE.getEPackage(DomPackage.eNS_URI);

    // Obtain or create and register package
    DomPackageImpl theDomPackage = (DomPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DomPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DomPackageImpl());

    isInited = true;

    // Initialize simple dependencies
    EcorePackage.eINSTANCE.eClass();

    // Create package meta-data objects
    theDomPackage.createPackageContents();

    // Initialize created meta-data
    theDomPackage.initializePackageContents();

    // Mark meta-data to indicate it can't be changed
    theDomPackage.freeze();


    // Update the registry and return the package
    EPackage.Registry.INSTANCE.put(DomPackage.eNS_URI, theDomPackage);
    return theDomPackage;
}
项目:time4sys    文件:HardwarePinOtherPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final HardwarePin hardwarePin = (HardwarePin)elt;
        final OtherPropertiesEditionPart otherPart = (OtherPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(HrmViewsRepository.Other.Properties.width)) {
            otherPart.setWidth(EEFConverterUtil.convertToString(EcorePackage.Literals.EINT, hardwarePin.getWidth()));
        }

        if (isAccessible(HrmViewsRepository.Other.Properties.direction)) {
            otherPart.initDirection(EEFUtils.choiceOfValues(hardwarePin, HrmPackage.eINSTANCE.getHardwarePin_Direction()), hardwarePin.getDirection());
        }
        // init filters


        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:time4sys    文件:DurationPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
    Duration duration = (Duration)semanticObject;
    if (NfpViewsRepository.General.Properties.value == event.getAffectedEditor()) {
        duration.setValue((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
    }
    if (NfpViewsRepository.General.Properties.unit == event.getAffectedEditor()) {
        duration.setUnit((TimeUnitKind)event.getNewValue());
    }
    if (NfpViewsRepository.General.Properties.best == event.getAffectedEditor()) {
        duration.setBest((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
    }
    if (NfpViewsRepository.General.Properties.worst == event.getAffectedEditor()) {
        duration.setWorst((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
    }
    if (NfpViewsRepository.General.Properties.clock == event.getAffectedEditor()) {
        duration.setClock((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
    }
    if (NfpViewsRepository.General.Properties.precision == event.getAffectedEditor()) {
        duration.setPrecision((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
    }
}
项目:time4sys    文件:ResourcePortGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        if (GrmPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(GrmViewsRepository.General.Properties.name)) {
            if (msg.getNewValue() != null) {
                generalPart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                generalPart.setName("");
            }
        }
        if (GrmPackage.eINSTANCE.getCommunicationEndPoint_PacketSize().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(GrmViewsRepository.General.Properties.packetSize)) {
            if (msg.getNewValue() != null) {
                generalPart.setPacketSize(EcoreUtil.convertToString(EcorePackage.Literals.EINT, msg.getNewValue()));
            } else {
                generalPart.setPacketSize("");
            }
        }

    }
}
项目:time4sys    文件:HardwareInterfacePackagePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        if (GrmPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(HrmViewsRepository.General.Properties.name)) {
            if (msg.getNewValue() != null) {
                generalPart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                generalPart.setName("");
            }
        }
        if (GrmPackage.eINSTANCE.getResourcePackage_OwnedElement().equals(msg.getFeature()) && isAccessible(HrmViewsRepository.General.Properties.ownedElement))
            generalPart.updateOwnedElement();

    }
}
项目:time4sys    文件:UsageTypedAmountTimingPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final UsageTypedAmount usageTypedAmount = (UsageTypedAmount)elt;
        final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(GrmViewsRepository.Timing.TimingProperties.execTime)) {
            timingPart.setExecTime(EEFConverterUtil.convertToString(EcorePackage.Literals.EINT, usageTypedAmount.getExecTime()));
        }

        // init filters

        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:time4sys    文件:OffsetPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        OffsetPropertiesEditionPart basePart = (OffsetPropertiesEditionPart)editingPart;
        if (AnalysisPackage.eINSTANCE.getOffset_EventModel().equals(msg.getFeature()) && basePart != null && isAccessible(AnalysisViewsRepository.Offset.Properties.eventModel))
            basePart.setEventModel((EObject)msg.getNewValue());
        if (AnalysisPackage.eINSTANCE.getOffset_Value().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.Offset.Properties.value)) {
            if (msg.getNewValue() != null) {
                basePart.setValue(EcoreUtil.convertToString(AnalysisPackage.Literals.NFP_DURATION, msg.getNewValue()));
            } else {
                basePart.setValue("");
            }
        }
        if (AnalysisPackage.eINSTANCE.getOffset_Reference().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.Offset.Properties.reference)) {
            if (msg.getNewValue() != null) {
                basePart.setReference(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setReference("");
            }
        }

    }
}
项目:gemoc-studio    文件:GexpressionsPackageImpl.java   
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 * 
 * <p>This method is used to initialize {@link GexpressionsPackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static GexpressionsPackage init() {
    if (isInited) return (GexpressionsPackage)EPackage.Registry.INSTANCE.getEPackage(GexpressionsPackage.eNS_URI);

    // Obtain or create and register package
    GexpressionsPackageImpl theGexpressionsPackage = (GexpressionsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof GexpressionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new GexpressionsPackageImpl());

    isInited = true;

    // Initialize simple dependencies
    EcorePackage.eINSTANCE.eClass();

    // Create package meta-data objects
    theGexpressionsPackage.createPackageContents();

    // Initialize created meta-data
    theGexpressionsPackage.initializePackageContents();

    // Mark meta-data to indicate it can't be changed
    theGexpressionsPackage.freeze();


    // Update the registry and return the package
    EPackage.Registry.INSTANCE.put(GexpressionsPackage.eNS_URI, theGexpressionsPackage);
    return theGexpressionsPackage;
}
项目:time4sys    文件:DesignModelPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        DesignModelPropertiesEditionPart basePart = (DesignModelPropertiesEditionPart)editingPart;
        if (DesignPackage.eINSTANCE.getDesignModel_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(DesignViewsRepository.DesignModel.Properties.name)) {
            if (msg.getNewValue() != null) {
                basePart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setName("");
            }
        }
        if (DesignPackage.eINSTANCE.getDesignModel_EndToEndFlows().equals(msg.getFeature()) && isAccessible(DesignViewsRepository.DesignModel.Properties.endToEndFlows))
            basePart.updateEndToEndFlows();

    }
}
项目:xmontiarc    文件:GroovyInterpreter.java   
public static EObject interpret(String groovyScript) {
        EDataType data =  EcorePackage.eINSTANCE.getEString();              
        Binding binding = new Binding();

        //Binding setVariable allow to pass a variable from the moonti arc model to the groovy interpreter
        //binding.setVariable(name, value);

         GroovyShell shell = new GroovyShell(binding);          
            Object result = shell.evaluate(groovyScript);

            //Binding.getVariable get the new value of this variable. 
//          binding.getVariable(name)


            //      data.setName(""+(rand.nextInt(100)+1));
        data.setName(""+result);
        return data;
    }
项目:time4sys    文件:ResourcePortGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final ResourcePort resourcePort = (ResourcePort)elt;
        final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(GrmViewsRepository.General.Properties.name))
            generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, resourcePort.getName()));

        if (isAccessible(GrmViewsRepository.General.Properties.packetSize)) {
            generalPart.setPacketSize(EEFConverterUtil.convertToString(EcorePackage.Literals.EINT, resourcePort.getPacketSize()));
        }

        // init filters


        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:time4sys    文件:HardwarePortGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
    HardwarePort hardwarePort = (HardwarePort)semanticObject;
    if (HrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
        hardwarePort.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
    }
    if (HrmViewsRepository.General.Properties.type == event.getAffectedEditor()) {
        hardwarePort.setType((PortType)event.getNewValue());
    }
    if (HrmViewsRepository.General.Properties.realizedBy == event.getAffectedEditor()) {
        if (event.getKind() == PropertiesEditionEvent.ADD) {
            if (event.getNewValue() instanceof HardwarePin) {
                realizedBySettings.addToReference((EObject) event.getNewValue());
            }
        } else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
            realizedBySettings.removeFromReference((EObject) event.getNewValue());
        } else if (event.getKind() == PropertiesEditionEvent.MOVE) {
            realizedBySettings.move(event.getNewIndex(), (HardwarePin) event.getNewValue());
        }
    }
}
项目:time4sys    文件:ResultContainerPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        ResultContainerPropertiesEditionPart basePart = (ResultContainerPropertiesEditionPart)editingPart;
        if (AnalysisPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.ResultContainer.Properties.name)) {
            if (msg.getNewValue() != null) {
                basePart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setName("");
            }
        }
        if (AnalysisPackage.eINSTANCE.getResultContainer_AnalyzedSystem().equals(msg.getFeature()) && basePart != null && isAccessible(AnalysisViewsRepository.ResultContainer.Properties.analyzedSystem))
            basePart.setAnalyzedSystem((EObject)msg.getNewValue());

    }
}
项目:gemoc-studio-modeldebugging    文件:ThreadUtilsTests.java   
/**
 * Tests {@link ThreadUtils#setCurrentInstructionReply(Thread, EObject, boolean)}.
 */
@Test
public void setCurrentInstructionReply() {
    final Thread thread = DebugPackage.eINSTANCE.getDebugFactory().createThread();
    thread.setName("thread");
    final StackFrame frame = DebugPackage.eINSTANCE.getDebugFactory().createStackFrame();
    frame.setName("frame");
    frame.setContext(EcorePackage.eINSTANCE);
    frame.setCurrentInstruction(null);
    frame.setCanStepIntoCurrentInstruction(false);
    thread.setBottomStackFrame(frame);
    thread.setTopStackFrame(frame);

    ThreadUtils.setCurrentInstructionReply(thread, EcorePackage.eINSTANCE, true);

    assertEquals(EcorePackage.eINSTANCE, thread.getTopStackFrame().getCurrentInstruction());
    assertEquals(true, thread.getTopStackFrame().isCanStepIntoCurrentInstruction());
}
项目:gemoc-studio-modeldebugging    文件:TracingannotationsPackageImpl.java   
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 * 
 * <p>This method is used to initialize {@link TracingannotationsPackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static TracingannotationsPackage init() {
    if (isInited) return (TracingannotationsPackage)EPackage.Registry.INSTANCE.getEPackage(TracingannotationsPackage.eNS_URI);

    // Obtain or create and register package
    TracingannotationsPackageImpl theTracingannotationsPackage = (TracingannotationsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TracingannotationsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TracingannotationsPackageImpl());

    isInited = true;

    // Initialize simple dependencies
    EcorePackage.eINSTANCE.eClass();

    // Create package meta-data objects
    theTracingannotationsPackage.createPackageContents();

    // Initialize created meta-data
    theTracingannotationsPackage.initializePackageContents();

    // Mark meta-data to indicate it can't be changed
    theTracingannotationsPackage.freeze();


    // Update the registry and return the package
    EPackage.Registry.INSTANCE.put(TracingannotationsPackage.eNS_URI, theTracingannotationsPackage);
    return theTracingannotationsPackage;
}
项目:time4sys    文件:ProtectionParameterGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final ProtectionParameter protectionParameter = (ProtectionParameter)elt;
        final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(GrmViewsRepository.General.Properties.name))
            generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, protectionParameter.getName()));

        // init filters

        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:time4sys    文件:EndToEndFlowGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        if (GqamPackage.eINSTANCE.getEndToEndFlow_IsSchedulable().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(GqamViewsRepository.General.Properties.isSchedulable))
            generalPart.setIsSchedulable((Boolean)msg.getNewValue());

        if (GqamPackage.eINSTANCE.getEndToEndFlow_SchedulabilitySlack().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(GqamViewsRepository.General.Properties.schedulabilitySlack)) {
            if (msg.getNewValue() != null) {
                generalPart.setSchedulabilitySlack(EcoreUtil.convertToString(EcorePackage.Literals.EDOUBLE, msg.getNewValue()));
            } else {
                generalPart.setSchedulabilitySlack("");
            }
        }
        if (GqamPackage.eINSTANCE.getEndToEndFlow_EndToEndScenario().equals(msg.getFeature()) && generalPart != null && isAccessible(GqamViewsRepository.General.Properties.endToEndScenario))
            generalPart.setEndToEndScenario((EObject)msg.getNewValue());
        if (GqamPackage.eINSTANCE.getEndToEndFlow_EndToEndStimuli().equals(msg.getFeature())  && isAccessible(GqamViewsRepository.General.Properties.endToEndStimuli))
            generalPart.updateEndToEndStimuli();

    }
}
项目:time4sys    文件:ResourceServicePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final ResourceService resourceService = (ResourceService)elt;
        final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(GrmViewsRepository.General.Properties.name))
            generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, resourceService.getName()));

        // init filters

        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:time4sys    文件:InputStimulusPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        InputStimulusPropertiesEditionPart basePart = (InputStimulusPropertiesEditionPart)editingPart;
        if (AnalysisPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.InputStimulus.Properties.name)) {
            if (msg.getNewValue() != null) {
                basePart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setName("");
            }
        }
        if (AnalysisPackage.eINSTANCE.getStimulus_Parent().equals(msg.getFeature()) && basePart != null && isAccessible(AnalysisViewsRepository.InputStimulus.Properties.parent_))
            basePart.setParent_((EObject)msg.getNewValue());
        if (AnalysisPackage.eINSTANCE.getInputStimulus_OutputPorts().equals(msg.getFeature()) && isAccessible(AnalysisViewsRepository.InputStimulus.Properties.outputPorts))
            basePart.updateOutputPorts();

    }
}
项目:time4sys    文件:ConstraintContainerPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        ConstraintContainerPropertiesEditionPart basePart = (ConstraintContainerPropertiesEditionPart)editingPart;
        if (AnalysisPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.ConstraintContainer.Properties.name)) {
            if (msg.getNewValue() != null) {
                basePart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setName("");
            }
        }
        if (AnalysisPackage.eINSTANCE.getConstraintContainer_Constraints().equals(msg.getFeature()) && isAccessible(AnalysisViewsRepository.ConstraintContainer.Properties.constraints))
            basePart.updateConstraints();
        if (AnalysisPackage.eINSTANCE.getConstraintContainer_AnalyzedSystem().equals(msg.getFeature()) && basePart != null && isAccessible(AnalysisViewsRepository.ConstraintContainer.Properties.analyzedSystem))
            basePart.setAnalyzedSystem((EObject)msg.getNewValue());

    }
}
项目:gemoc-studio    文件:FsmPackageImpl.java   
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 * 
 * <p>This method is used to initialize {@link FsmPackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static FsmPackage init() {
    if (isInited) return (FsmPackage)EPackage.Registry.INSTANCE.getEPackage(FsmPackage.eNS_URI);

    // Obtain or create and register package
    FsmPackageImpl theFsmPackage = (FsmPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FsmPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FsmPackageImpl());

    isInited = true;

    // Initialize simple dependencies
    EcorePackage.eINSTANCE.eClass();

    // Create package meta-data objects
    theFsmPackage.createPackageContents();

    // Initialize created meta-data
    theFsmPackage.initializePackageContents();

    // Mark meta-data to indicate it can't be changed
    theFsmPackage.freeze();


    // Update the registry and return the package
    EPackage.Registry.INSTANCE.put(FsmPackage.eNS_URI, theFsmPackage);
    return theFsmPackage;
}
项目:time4sys    文件:ResourceSchedulingParameterValuePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        ResourceSchedulingParameterValuePropertiesEditionPart basePart = (ResourceSchedulingParameterValuePropertiesEditionPart)editingPart;
        if (AnalysisPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.name)) {
            if (msg.getNewValue() != null) {
                basePart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setName("");
            }
        }
        if (AnalysisPackage.eINSTANCE.getResourceSchedulingParameterValue_Value().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.value)) {
            if (msg.getNewValue() != null) {
                basePart.setValue(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setValue("");
            }
        }

    }
}
项目:time4sys    文件:HardwarePinGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final HardwarePin hardwarePin = (HardwarePin)elt;
        final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(HrmViewsRepository.General.Properties.name))
            generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, hardwarePin.getName()));

        // init filters

        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:time4sys    文件:SoftwarePortOtherPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        OtherPropertiesEditionPart otherPart = (OtherPropertiesEditionPart)editingPart;
        if (GrmPackage.eINSTANCE.getCommunicationEndPoint_PacketSize().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && otherPart != null && isAccessible(SrmViewsRepository.Other.Properties.packetSize)) {
            if (msg.getNewValue() != null) {
                otherPart.setPacketSize(EcoreUtil.convertToString(EcorePackage.Literals.EINT, msg.getNewValue()));
            } else {
                otherPart.setPacketSize("");
            }
        }
        if (GrmPackage.eINSTANCE.getResourcePort_PInterface().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.pInterface))
            otherPart.updatePInterface();
        if (GrmPackage.eINSTANCE.getResourcePort_RInterface().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.rInterface))
            otherPart.updateRInterface();

    }
}
项目:time4sys    文件:ResourceInstancePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
    ResourceInstance resourceInstance = (ResourceInstance)semanticObject;
    if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
        resourceInstance.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
    }
    if (GrmViewsRepository.General.Properties.type == event.getAffectedEditor()) {
        if (event.getKind() == PropertiesEditionEvent.SET) {
            typeSettings.setToReference((Resource)event.getNewValue());
        } else if (event.getKind() == PropertiesEditionEvent.ADD) {
            EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, typeSettings, editingContext.getAdapterFactory());
            PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
            if (provider != null) {
                PropertiesEditingPolicy policy = provider.getPolicy(context);
                if (policy instanceof CreateEditingPolicy) {
                    policy.execute();
                }
            }
        }
    }
}
项目:time4sys    文件:ResourcePackagePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        if (GrmPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(GrmViewsRepository.General.Properties.name)) {
            if (msg.getNewValue() != null) {
                generalPart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                generalPart.setName("");
            }
        }
        if (GrmPackage.eINSTANCE.getResourcePackage_OwnedElement().equals(msg.getFeature()) && isAccessible(GrmViewsRepository.General.Properties.ownedElement))
            generalPart.updateOwnedElement();

    }
}
项目:time4sys    文件:SchedulerParameterValuePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        SchedulerParameterValuePropertiesEditionPart basePart = (SchedulerParameterValuePropertiesEditionPart)editingPart;
        if (AnalysisPackage.eINSTANCE.getSchedulerParameterValue_Type().equals(msg.getFeature()) && basePart != null && isAccessible(AnalysisViewsRepository.SchedulerParameterValue.Properties.type))
            basePart.setType((EObject)msg.getNewValue());
        if (AnalysisPackage.eINSTANCE.getSchedulerParameterValue_Value().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(AnalysisViewsRepository.SchedulerParameterValue.Properties.value)) {
            if (msg.getNewValue() != null) {
                basePart.setValue(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setValue("");
            }
        }
        if (AnalysisPackage.eINSTANCE.getSchedulerParameterValue_Parent().equals(msg.getFeature()) && basePart != null && isAccessible(AnalysisViewsRepository.SchedulerParameterValue.Properties.parent_))
            basePart.setParent_((EObject)msg.getNewValue());

    }
}
项目:n4js    文件:ValidationPackageImpl.java   
/**
 * Complete the initialization of the package and its meta-model.  This
 * method is guarded to have no affect on any invocation but its first.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void initializePackageContents() {
    if (isInitialized) return;
    isInitialized = true;

    // Initialize package
    setName(eNAME);
    setNsPrefix(eNS_PREFIX);
    setNsURI(eNS_URI);

    // Obtain other dependent packages
    EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);

    // Create type parameters

    // Set bounds for type parameters

    // Add supertypes to classes
    preValidationEClass.getESuperTypes().add(this.getValidationMarker());
    postValidationEClass.getESuperTypes().add(this.getValidationMarker());

    // Initialize classes, features, and operations; add parameters
    initEClass(validationMarkerEClass, ValidationMarker.class, "ValidationMarker", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getValidationMarker_DelegateResource(), theEcorePackage.getEResource(), "delegateResource", null, 0, 1, ValidationMarker.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

    initEOperation(getValidationMarker__EResource(), theEcorePackage.getEResource(), "eResource", 0, 1, !IS_UNIQUE, IS_ORDERED);

    initEClass(preValidationEClass, PreValidation.class, "PreValidation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    initEClass(postValidationEClass, PostValidation.class, "PostValidation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

    // Create resource
    createResource(eNS_URI);
}
项目:time4sys    文件:DeadlineMonotonicSchedulingPolicyPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final DeadlineMonotonicSchedulingPolicy deadlineMonotonicSchedulingPolicy = (DeadlineMonotonicSchedulingPolicy)elt;
        final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(LibraryViewsRepository.General.Properties.name))
            generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, deadlineMonotonicSchedulingPolicy.getName()));

        if (isAccessible(LibraryViewsRepository.General.Properties.policy)) {
            generalPart.initPolicy(EEFUtils.choiceOfValues(deadlineMonotonicSchedulingPolicy, GrmPackage.eINSTANCE.getSchedulingPolicy_Policy()), deadlineMonotonicSchedulingPolicy.getPolicy());
        }
        if (isAccessible(LibraryViewsRepository.General.Properties.otherSchedPolicy))
            generalPart.setOtherSchedPolicy(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, deadlineMonotonicSchedulingPolicy.getOtherSchedPolicy()));

        // init filters



        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:time4sys    文件:SharedDataComResourceOtherPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        OtherPropertiesEditionPart otherPart = (OtherPropertiesEditionPart)editingPart;
        if (GrmPackage.eINSTANCE.getCommunicationEndPoint_PacketSize().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && otherPart != null && isAccessible(SrmViewsRepository.Other.Properties.packetSize)) {
            if (msg.getNewValue() != null) {
                otherPart.setPacketSize(EcoreUtil.convertToString(EcorePackage.Literals.EINT, msg.getNewValue()));
            } else {
                otherPart.setPacketSize("");
            }
        }
        if (GrmPackage.eINSTANCE.getResource_PServices().equals(msg.getFeature()) && isAccessible(SrmViewsRepository.Other.Properties.pServices))
            otherPart.updatePServices();
        if (GrmPackage.eINSTANCE.getResource_RServices().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.rServices))
            otherPart.updateRServices();
        if (SrmPackage.eINSTANCE.getSoftwareResource_CreateServices().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.createServices))
            otherPart.updateCreateServices();
        if (SrmPackage.eINSTANCE.getSoftwareResource_DeleteServices().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.deleteServices))
            otherPart.updateDeleteServices();
        if (SrmPackage.eINSTANCE.getSoftwareResource_InitializeServices().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.initializeServices))
            otherPart.updateInitializeServices();
        if (SrmPackage.eINSTANCE.getSoftwareInteractionResource_IsIntraMemoryPartitionInteraction().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && otherPart != null && isAccessible(SrmViewsRepository.Other.Properties.isIntraMemoryPartitionInteraction))
            otherPart.setIsIntraMemoryPartitionInteraction((Boolean)msg.getNewValue());

        if (SrmPackage.eINSTANCE.getSharedDataComResource_ReadServices().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.readServices))
            otherPart.updateReadServices();
        if (SrmPackage.eINSTANCE.getSharedDataComResource_WriteServices().equals(msg.getFeature())  && isAccessible(SrmViewsRepository.Other.Properties.writeServices))
            otherPart.updateWriteServices();

    }
}
项目:SimQRI    文件:UniformPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final Uniform uniform = (Uniform)elt;
        final UniformPropertiesEditionPart basePart = (UniformPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(MetamodelViewsRepository.Uniform.Properties.minimum)) {
            basePart.setMinimum(EEFConverterUtil.convertToString(EcorePackage.Literals.EDOUBLE, uniform.getMinimum()));
        }

        if (isAccessible(MetamodelViewsRepository.Uniform.Properties.maximum)) {
            basePart.setMaximum(EEFConverterUtil.convertToString(EcorePackage.Literals.EDOUBLE, uniform.getMaximum()));
        }

        // init filters


        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}
项目:SimQRI    文件:UniformPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
    Uniform uniform = (Uniform)semanticObject;
    if (MetamodelViewsRepository.Uniform.Properties.minimum == event.getAffectedEditor()) {
        uniform.setMinimum((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
    }
    if (MetamodelViewsRepository.Uniform.Properties.maximum == event.getAffectedEditor()) {
        uniform.setMaximum((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
    }
}
项目:time4sys    文件:SoftwareServicePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
    SoftwareService softwareService = (SoftwareService)semanticObject;
    if (SrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
        softwareService.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
    }
}
项目:time4sys    文件:HardwarePlatformGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        if (GrmPackage.eINSTANCE.getNamedElement_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(HrmViewsRepository.General.Properties.name)) {
            if (msg.getNewValue() != null) {
                generalPart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                generalPart.setName("");
            }
        }
        if (GrmPackage.eINSTANCE.getResource_OwnedResource().equals(msg.getFeature()) && isAccessible(HrmViewsRepository.General.Properties.ownedResource))
            generalPart.updateOwnedResource();
        if (GrmPackage.eINSTANCE.getResource_ResMult().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(HrmViewsRepository.General.Properties.resMult)) {
            if (msg.getNewValue() != null) {
                generalPart.setResMult(EcoreUtil.convertToString(EcorePackage.Literals.EINT, msg.getNewValue()));
            } else {
                generalPart.setResMult("");
            }
        }
        if (GrmPackage.eINSTANCE.getResource_IsProtected().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(HrmViewsRepository.General.Properties.isProtected))
            generalPart.setIsProtected((Boolean)msg.getNewValue());

        if (GrmPackage.eINSTANCE.getResource_IsActive().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && generalPart != null && isAccessible(HrmViewsRepository.General.Properties.isActive))
            generalPart.setIsActive((Boolean)msg.getNewValue());

        if (GrmPackage.eINSTANCE.getResource_OwnedConnector().equals(msg.getFeature()) && isAccessible(HrmViewsRepository.General.Properties.ownedConnector))
            generalPart.updateOwnedConnector();
        if (GrmPackage.eINSTANCE.getResource_UsedBy().equals(msg.getFeature())  && isAccessible(HrmViewsRepository.General.Properties.usedBy))
            generalPart.updateUsedBy();

    }
}
项目:time4sys    文件:ConstraintsPackageImpl.java   
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 * 
 * <p>This method is used to initialize {@link ConstraintsPackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static ConstraintsPackage init() {
    if (isInited) return (ConstraintsPackage)EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);

    // Obtain or create and register package
    ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConstraintsPackageImpl());

    isInited = true;

    // Initialize simple dependencies
    AnalysisPackage.eINSTANCE.eClass();
    EcorePackage.eINSTANCE.eClass();

    // Create package meta-data objects
    theConstraintsPackage.createPackageContents();

    // Initialize created meta-data
    theConstraintsPackage.initializePackageContents();

    // Mark meta-data to indicate it can't be changed
    theConstraintsPackage.freeze();


    // Update the registry and return the package
    EPackage.Registry.INSTANCE.put(ConstraintsPackage.eNS_URI, theConstraintsPackage);
    return theConstraintsPackage;
}
项目:SimQRI    文件:StoragePropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
 */
public void updatePart(Notification msg) {
    super.updatePart(msg);
    if (editingPart.isVisible()) {
        StoragePropertiesEditionPart basePart = (StoragePropertiesEditionPart)editingPart;
        if (MetamodelPackage.eINSTANCE.getComponent_Name().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(MetamodelViewsRepository.Storage.Properties.name)) {
            if (msg.getNewValue() != null) {
                basePart.setName(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, msg.getNewValue()));
            } else {
                basePart.setName("");
            }
        }
        if (MetamodelPackage.eINSTANCE.getStorage_Size().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(MetamodelViewsRepository.Storage.Properties.size)) {
            if (msg.getNewValue() != null) {
                basePart.setSize(EcoreUtil.convertToString(MetamodelPackage.Literals.POSITIVE_INT_NOT_NULL, msg.getNewValue()));
            } else {
                basePart.setSize("");
            }
        }
        if (MetamodelPackage.eINSTANCE.getStorage_InitialContent().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(MetamodelViewsRepository.Storage.Properties.initialContent)) {
            if (msg.getNewValue() != null) {
                basePart.setInitialContent(EcoreUtil.convertToString(MetamodelPackage.Literals.POSITIVE_INT, msg.getNewValue()));
            } else {
                basePart.setInitialContent("");
            }
        }
        if (MetamodelPackage.eINSTANCE.getStorage_Overflow().equals(msg.getFeature()) && msg.getNotifier().equals(semanticObject) && basePart != null && isAccessible(MetamodelViewsRepository.Storage.Properties.overflow))
            basePart.setOverflow((Boolean)msg.getNewValue());

        if (MetamodelPackage.eINSTANCE.getStorage_StorageOutputFlow().equals(msg.getFeature())  && isAccessible(MetamodelViewsRepository.Storage.Properties.storageOutputFlow))
            basePart.updateStorageOutputFlow();
        if (MetamodelPackage.eINSTANCE.getStorage_OrderOnStockThreshold().equals(msg.getFeature())  && isAccessible(MetamodelViewsRepository.Storage.Properties.orderOnStockThreshold))
            basePart.updateOrderOnStockThreshold();
        if (MetamodelPackage.eINSTANCE.getStorage_ProcessOutputFlow().equals(msg.getFeature())  && isAccessible(MetamodelViewsRepository.Storage.Properties.processOutputFlow))
            basePart.updateProcessOutputFlow();

    }
}
项目:time4sys    文件:HardwarePortGeneralPropertiesEditionComponent.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);

        final HardwarePort hardwarePort = (HardwarePort)elt;
        final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
        // init values
        if (isAccessible(HrmViewsRepository.General.Properties.name))
            generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, hardwarePort.getName()));

        if (isAccessible(HrmViewsRepository.General.Properties.type)) {
            generalPart.initType(EEFUtils.choiceOfValues(hardwarePort, HrmPackage.eINSTANCE.getHardwarePort_Type()), hardwarePort.getType());
        }
        if (isAccessible(HrmViewsRepository.General.Properties.realizedBy)) {
            realizedBySettings = new ReferencesTableSettings(hardwarePort, HrmPackage.eINSTANCE.getHardwarePort_RealizedBy());
            generalPart.initRealizedBy(realizedBySettings);
        }
        // init filters


        if (isAccessible(HrmViewsRepository.General.Properties.realizedBy)) {
            generalPart.addFilterToRealizedBy(new EObjectFilter(HrmPackage.Literals.HARDWARE_PIN));
            // Start of user code for additional businessfilters for realizedBy
            // End of user code
        }
        // init values for referenced views

        // init filters for referenced views

    }
    setInitializing(false);
}