Java Code Examples for org.eclipse.emf.common.notify.Adapter

The following examples show how to use org.eclipse.emf.common.notify.Adapter. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
public Grammar getSuperGrammar(final Grammar grammar) {
  boolean _isEmpty = grammar.getUsedGrammars().isEmpty();
  if (_isEmpty) {
    return null;
  }
  Adapter _existingAdapter = EcoreUtil.getExistingAdapter(grammar, SemanticSequencerExtensions.SuperGrammar.class);
  SemanticSequencerExtensions.SuperGrammar sg = ((SemanticSequencerExtensions.SuperGrammar) _existingAdapter);
  if ((sg != null)) {
    return sg.grammar;
  }
  final URI uri = IterableExtensions.<Grammar>head(grammar.getUsedGrammars()).eResource().getURI();
  final Resource resource = this.cloneResourceSet(grammar.eResource().getResourceSet()).getResource(uri, true);
  EObject _head = IterableExtensions.<EObject>head(resource.getContents());
  final Grammar result = ((Grammar) _head);
  EList<Adapter> _eAdapters = grammar.eAdapters();
  SemanticSequencerExtensions.SuperGrammar _superGrammar = new SemanticSequencerExtensions.SuperGrammar(result);
  _eAdapters.add(_superGrammar);
  return result;
}
 
Example 2
/**
 * This creates an adapter for a {@link org.eclipse.scada.vi.details.model.ScriptVisibility}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createScriptVisibilityAdapter ()
{
    if ( scriptVisibilityItemProvider == null )
    {
        scriptVisibilityItemProvider = new ScriptVisibilityItemProvider ( this );
    }

    return scriptVisibilityItemProvider;
}
 
Example 3
/**
 * This creates an adapter for a {@link org.eclipse.scada.configuration.item.CallSuper}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createCallSuperAdapter ()
{
    if ( callSuperItemProvider == null )
    {
        callSuperItemProvider = new CallSuperItemProvider ( this );
    }

    return callSuperItemProvider;
}
 
Example 4
Source Project: ifml-editor   Source File: ExtensionsItemProviderAdapterFactory.java    License: MIT License 5 votes vote down vote up
/**
 * This creates an adapter for a {@link IFML.Extensions.Position}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createPositionAdapter() {
	if (positionItemProvider == null) {
		positionItemProvider = new PositionItemProvider(this);
	}

	return positionItemProvider;
}
 
Example 5
/**
 * This creates an adapter for a {@link org.eclipse.scada.da.server.component.parser.factory.configuration.FileInput}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createFileInputAdapter ()
{
    if ( fileInputItemProvider == null )
    {
        fileInputItemProvider = new FileInputItemProvider ( this );
    }

    return fileInputItemProvider;
}
 
Example 6
/**
 * This creates an adapter for a {@link org.eclipse.scada.configuration.infrastructure.ValueArchiveServer}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createValueArchiveServerAdapter ()
{
    if ( valueArchiveServerItemProvider == null )
    {
        valueArchiveServerItemProvider = new ValueArchiveServerItemProvider ( this );
    }

    return valueArchiveServerItemProvider;
}
 
Example 7
/**
 * This creates an adapter for a {@link org.yakindu.sct.model.sexec.ExecutionSynchronization}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createExecutionSynchronizationAdapter() {
	if (executionSynchronizationItemProvider == null) {
		executionSynchronizationItemProvider = new ExecutionSynchronizationItemProvider(this);
	}

	return executionSynchronizationItemProvider;
}
 
Example 8
@Override
public String getDocComment() {
  Adapter _adapter = EcoreUtil.getAdapter(this.getDelegate().eAdapters(), DocumentationAdapter.class);
  final DocumentationAdapter adapter = ((DocumentationAdapter) _adapter);
  String _documentation = null;
  if (adapter!=null) {
    _documentation=adapter.getDocumentation();
  }
  return _documentation;
}
 
Example 9
/**
 * This creates an adapter for a {@link org.eclipse.scada.configuration.recipe.Task}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createTaskAdapter ()
{
    if ( taskItemProvider == null )
    {
        taskItemProvider = new TaskItemProvider ( this );
    }

    return taskItemProvider;
}
 
Example 10
/**
    * This creates an adapter for a {@link org.bonitasoft.studio.model.form.DateFormField}.
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public Adapter createDateFormFieldAdapter() {
       if (dateFormFieldItemProvider == null) {
           dateFormFieldItemProvider = new DateFormFieldItemProvider(this);
       }

       return dateFormFieldItemProvider;
   }
 
Example 11
/**
 * This creates an adapter for a {@link com.avaloq.tools.ddk.typesystem.typemodel.Callable}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createCallableAdapter()
{
	if (callableItemProvider == null)
	{
		callableItemProvider = new CallableItemProvider(this);
	}

	return callableItemProvider;
}
 
Example 12
/**
 * This creates an adapter for a {@link org.eclipse.scada.configuration.world.osgi.DefaultMasterServer}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Adapter createDefaultMasterServerAdapter ()
{
    if ( defaultMasterServerItemProvider == null )
    {
        defaultMasterServerItemProvider = new DefaultMasterServerItemProvider ( this );
    }

    return defaultMasterServerItemProvider;
}
 
Example 13
/**
 * This creates an adapter for a {@link org.bonitasoft.studio.connector.model.definition.Output}.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   @Override
   public Adapter createOutputAdapter() {
	if (outputItemProvider == null) {
		outputItemProvider = new OutputItemProvider(this);
	}

	return outputItemProvider;
}
 
Example 14
@Override
public Adapter caseAbstractMetamodelDeclaration(AbstractMetamodelDeclaration object)
{
  return createAbstractMetamodelDeclarationAdapter();
}
 
Example 15
Source Project: dsl-devkit   Source File: CheckAdapterFactory.java    License: Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Adapter caseXIssueExpression(XIssueExpression object)
{
	return createXIssueExpressionAdapter();
}
 
Example 16
Source Project: neoscada   Source File: DetailViewAdapterFactory.java    License: Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Adapter caseReadableComponent ( ReadableComponent object )
{
    return createReadableComponentAdapter ();
}
 
Example 17
@Override
public Adapter caseServiceDescriptor(ServiceDescriptor object) {
	return createServiceDescriptorAdapter();
}
 
Example 18
Source Project: birt   Source File: AttributeAdapterFactory.java    License: Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Adapter caseDateFormatSpecifier( DateFormatSpecifier object )
{
	return createDateFormatSpecifierAdapter( );
}
 
Example 19
@Override
public Adapter caseTimeDef(TimeDef object)
{
  return createTimeDefAdapter();
}
 
Example 20
Source Project: n4js   Source File: ImAdapterFactory.java    License: Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Adapter caseSymbolTable(SymbolTable object) {
	return createSymbolTableAdapter();
}
 
Example 21
@Override
public Adapter caseConnectorImplementation(ConnectorImplementation object) {
	return createConnectorImplementationAdapter();
}
 
Example 22
@Override
public Adapter caseTwoRequired(TwoRequired object)
{
  return createTwoRequiredAdapter();
}
 
Example 23
@Override
public Adapter caseEnumLiteralDeclaration(EnumLiteralDeclaration object)
{
  return createEnumLiteralDeclarationAdapter();
}
 
Example 24
Source Project: neoscada   Source File: IEC62541AdapterFactory.java    License: Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Adapter caseDevice ( Device object )
{
    return createDeviceAdapter ();
}
 
Example 25
@Override
public Adapter caseAssign(Assign object)
{
  return createAssignAdapter();
}
 
Example 26
@Override
public Adapter caseExtendsNsURIEObject(ExtendsNsURIEObject object)
{
  return createExtendsNsURIEObjectAdapter();
}
 
Example 27
@Override
public Adapter caseProject(Project object) {
	return createProjectAdapter();
}
 
Example 28
@Override
public Adapter caseExpression(Expression object)
{
  return createExpressionAdapter();
}
 
Example 29
Source Project: n4js   Source File: ImAdapterFactory.java    License: Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Adapter caseN4SetterDeclaration(N4SetterDeclaration object) {
	return createN4SetterDeclarationAdapter();
}
 
Example 30
@Override
public Adapter caseShape(Shape object) {
	return createShapeAdapter();
}