Search in sources :

Example 6 with SpecificationElement

use of org.yakindu.sct.model.sgraph.SpecificationElement in project statecharts by Yakindu.

the class AbstractSCTResource method detachedHelper.

@Override
protected void detachedHelper(EObject eObject) {
    if (eObject instanceof SpecificationElement) {
        Adapter parseAdapter = EcoreUtil.getExistingAdapter(eObject, ParseAdapter.class);
        if (parseAdapter != null) {
            eObject.eAdapters().remove(parseAdapter);
        }
        Adapter serializeAdapter = EcoreUtil.getExistingAdapter(eObject, SerializeAdapter.class);
        if (serializeAdapter != null) {
            eObject.eAdapters().remove(serializeAdapter);
        }
    }
    super.detachedHelper(eObject);
}
Also used : SpecificationElement(org.yakindu.sct.model.sgraph.SpecificationElement) EContentAdapter(org.eclipse.emf.ecore.util.EContentAdapter) Adapter(org.eclipse.emf.common.notify.Adapter)

Aggregations

SpecificationElement (org.yakindu.sct.model.sgraph.SpecificationElement)6 Adapter (org.eclipse.emf.common.notify.Adapter)2 EObject (org.eclipse.emf.ecore.EObject)2 EContentAdapter (org.eclipse.emf.ecore.util.EContentAdapter)2 StringReader (java.io.StringReader)1 Diagnostic (org.eclipse.emf.ecore.resource.Resource.Diagnostic)1 ParserRule (org.eclipse.xtext.ParserRule)1 DiagnosticMessage (org.eclipse.xtext.diagnostics.DiagnosticMessage)1 XtextLinkingDiagnostic (org.eclipse.xtext.linking.impl.XtextLinkingDiagnostic)1 QualifiedName (org.eclipse.xtext.naming.QualifiedName)1 INode (org.eclipse.xtext.nodemodel.INode)1 IParseResult (org.eclipse.xtext.parser.IParseResult)1 XtextSyntaxDiagnostic (org.eclipse.xtext.resource.XtextSyntaxDiagnostic)1 ListBasedDiagnosticConsumer (org.eclipse.xtext.resource.impl.ListBasedDiagnosticConsumer)1 ImportNormalizer (org.eclipse.xtext.scoping.impl.ImportNormalizer)1 Task (org.eclipse.xtext.tasks.Task)1 TaskTags (org.eclipse.xtext.tasks.TaskTags)1 DocumentedElement (org.yakindu.base.base.DocumentedElement)1 Region (org.yakindu.sct.model.sgraph.Region)1 Statechart (org.yakindu.sct.model.sgraph.Statechart)1