blob: afc64ca7484bb4de0aae83df4c3cecd0ef793ac1 [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*
* This copyright notice shows up in the generated Java code
*/
package org.eclipse.osbp.xtext.entitymock.ui.labeling;
import com.google.common.base.Objects;
import com.google.inject.Inject;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.osbp.dsl.semantic.common.types.LEnumLiteral;
import org.eclipse.osbp.dsl.semantic.common.types.LImport;
import org.eclipse.osbp.dsl.semantic.entity.LEntity;
import org.eclipse.osbp.dsl.semantic.entity.LEntityAttribute;
import org.eclipse.osbp.dsl.semantic.entity.LEntityReference;
import org.eclipse.osbp.xtext.basic.ui.labeling.BasicDSLLabelProvider;
import org.eclipse.osbp.xtext.datainterchange.DataInterchange;
import org.eclipse.osbp.xtext.datainterchange.DataInterchangeFile;
import org.eclipse.osbp.xtext.datainterchange.DataInterchangeFileCSV;
import org.eclipse.osbp.xtext.datainterchange.DataInterchangeFileEDI;
import org.eclipse.osbp.xtext.datainterchange.DataInterchangeFileXML;
import org.eclipse.osbp.xtext.entitymock.DateIterate;
import org.eclipse.osbp.xtext.entitymock.EntityMockAttributeByObject;
import org.eclipse.osbp.xtext.entitymock.EntityMockAttributeByReference;
import org.eclipse.osbp.xtext.entitymock.EntityMockAttributeFiller;
import org.eclipse.osbp.xtext.entitymock.EntityMockEntities;
import org.eclipse.osbp.xtext.entitymock.EntityMockEntity;
import org.eclipse.osbp.xtext.entitymock.EntityMockEntityFunction;
import org.eclipse.osbp.xtext.entitymock.EntityMockModel;
import org.eclipse.osbp.xtext.entitymock.EntityMockObject;
import org.eclipse.osbp.xtext.entitymock.EntityMockObjectArrayValue;
import org.eclipse.osbp.xtext.entitymock.EntityMockObjectEmbed;
import org.eclipse.osbp.xtext.entitymock.EntityMockObjectEnum;
import org.eclipse.osbp.xtext.entitymock.EntityMockObjectFill;
import org.eclipse.osbp.xtext.entitymock.EntityMockObjectItemValue;
import org.eclipse.osbp.xtext.entitymock.EntityMockObjectPlainValue;
import org.eclipse.osbp.xtext.entitymock.EntityMockObjects;
import org.eclipse.osbp.xtext.entitymock.EntityMockPackage;
import org.eclipse.osbp.xtext.entitymock.EntityMockReferencedObjectAttribute;
import org.eclipse.osbp.xtext.entitymock.EntityMockResource;
import org.eclipse.osbp.xtext.entitymock.EntityMockResourceDataRow;
import org.eclipse.osbp.xtext.entitymock.EntityMockResources;
import org.eclipse.osbp.xtext.entitymock.EntityMockTemporary;
import org.eclipse.osbp.xtext.entitymock.IEntityMockObjectUsable;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerDateFuture;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerDatePast;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerDateRange;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerSignedDoubleRandom;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerSignedDoubleRange;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerSignedIntegerRandom;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerSignedIntegerRange;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerTextParagraphs;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerTextRandom;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerTextSentences;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerTextWords;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerType;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerUnsignedDoubleRandom;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerUnsignedDoubleRange;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerUnsignedIntegerRandom;
import org.eclipse.osbp.xtext.entitymock.PropertyFillerUnsignedIntegerRange;
import org.eclipse.osbp.xtext.entitymock.RunningDataInterchange;
import org.eclipse.osbp.xtext.entitymock.RunningDataInterchanges;
import org.eclipse.swt.graphics.Image;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.Keyword;
/**
* Provides labels for a EObjects.
*
* see http://www.eclipse.org/Xtext/documentation.html#labelProvider
*/
@SuppressWarnings("all")
public class EntityMockDSLLabelProvider extends BasicDSLLabelProvider {
@Inject
public EntityMockDSLLabelProvider(final AdapterFactoryLabelProvider delegate) {
super(delegate);
}
public Object text(final Object o) {
Object _switchResult = null;
boolean _matched = false;
if (!_matched) {
if (o instanceof EntityMockAttributeByObject) {
_matched=true;
LEntityAttribute _attributeRef = ((EntityMockAttributeByObject)o).getAttributeRef();
String _name = _attributeRef.getName();
_switchResult = this.generateText(o, "attribute by object", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockAttributeByReference) {
_matched=true;
LEntityReference _attributeRef = ((EntityMockAttributeByReference)o).getAttributeRef();
String _name = _attributeRef.getName();
_switchResult = this.generateText(o, "attribute by reference", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockAttributeFiller) {
_matched=true;
LEntityAttribute _attributeRef = ((EntityMockAttributeFiller)o).getAttributeRef();
String _name = _attributeRef.getName();
_switchResult = this.generateText(o, "attribute filler", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockEntities) {
_matched=true;
_switchResult = "mocked entity model";
}
}
if (!_matched) {
if (o instanceof EntityMockEntity) {
_matched=true;
LEntity _entityRef = ((EntityMockEntity)o).getEntityRef();
String _name = _entityRef.getName();
_switchResult = this.generateText(o, "entity", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockEntityFunction) {
_matched=true;
LEntityAttribute _attributeRef = ((EntityMockEntityFunction)o).getAttributeRef();
String _name = null;
if (_attributeRef!=null) {
_name=_attributeRef.getName();
}
_switchResult = this.generateText(o, "entity function", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObject) {
_matched=true;
String _name = ((EntityMockObject)o).getName();
_switchResult = this.generateText(o, "object", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectArrayValue) {
_matched=true;
String _name = ((EntityMockObjectArrayValue)o).getName();
_switchResult = this.generateText(o, "array value", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectEmbed) {
_matched=true;
String _name = ((EntityMockObjectEmbed)o).getName();
_switchResult = this.generateText(o, "object embed", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectEnum) {
_matched=true;
String _name = ((EntityMockObjectEnum)o).getName();
_switchResult = this.generateText(o, "object enum", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectFill) {
_matched=true;
String _name = ((EntityMockObjectFill)o).getName();
_switchResult = this.generateText(o, "object fill", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectItemValue) {
_matched=true;
LEnumLiteral _datarow = ((EntityMockObjectItemValue)o).getDatarow();
String _name = _datarow.getName();
_switchResult = this.generateText(o, "item value", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectPlainValue) {
_matched=true;
String _name = ((EntityMockObjectPlainValue)o).getName();
_switchResult = this.generateText(o, "plain value", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockObjects) {
_matched=true;
_switchResult = "mock objects";
}
}
if (!_matched) {
if (o instanceof EntityMockPackage) {
_matched=true;
_switchResult = "mocked\tentity model";
}
}
if (!_matched) {
if (o instanceof EntityMockReferencedObjectAttribute) {
_matched=true;
String _xblockexpression = null;
{
EntityMockTemporary _temporary = ((EntityMockReferencedObjectAttribute)o).getTemporary();
String r = _temporary.getName();
EList<EntityMockObjectEmbed> _embedded = ((EntityMockReferencedObjectAttribute)o).getEmbedded();
for (final EntityMockObjectEmbed e : _embedded) {
StringConcatenation _builder = new StringConcatenation();
_builder.append(r, "");
_builder.append(".");
String _name = e.getName();
_builder.append(_name, "");
r = _builder.toString();
}
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append(r, "");
_builder_1.append(".");
IEntityMockObjectUsable _attribute = ((EntityMockReferencedObjectAttribute)o).getAttribute();
String _text = this.getText(_attribute);
_builder_1.append(_text, "");
_xblockexpression = _builder_1.toString();
}
_switchResult = _xblockexpression;
}
}
if (!_matched) {
if (o instanceof EntityMockResource) {
_matched=true;
String _name = ((EntityMockResource)o).getName();
_switchResult = this.generateText(o, "resource", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockResources) {
_matched=true;
_switchResult = "mock resources";
}
}
if (!_matched) {
if (o instanceof EntityMockResourceDataRow) {
_matched=true;
String _name = ((EntityMockResourceDataRow)o).getName();
_switchResult = this.generateText(o, "data row", _name);
}
}
if (!_matched) {
if (o instanceof EntityMockTemporary) {
_matched=true;
String _name = ((EntityMockTemporary)o).getName();
_switchResult = this.generateText(o, "temporary", _name);
}
}
if (!_matched) {
if (o instanceof DateIterate) {
_matched=true;
EObject _eContainer = ((DateIterate)o).eContainer();
LEntityAttribute _iterator = null;
if (((EntityMockEntity) _eContainer)!=null) {
_iterator=((EntityMockEntity) _eContainer).getIterator();
}
String _name = null;
if (_iterator!=null) {
_name=_iterator.getName();
}
_switchResult = this.generateText(o, "date iterate", _name);
}
}
if (!_matched) {
if (o instanceof LImport) {
_matched=true;
String _importedNamespace = ((LImport)o).getImportedNamespace();
_switchResult = this.generateText(o, "import", _importedNamespace);
}
}
if (!_matched) {
if (o instanceof PropertyFillerDateFuture) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("between now and ");
int _dateFutureYears = ((PropertyFillerDateFuture)o).getDateFutureYears();
_builder.append(_dateFutureYears, "");
_builder.append(" years into the future");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerDatePast) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("between ");
int _datePastYears = ((PropertyFillerDatePast)o).getDatePastYears();
_builder.append(_datePastYears, "");
_builder.append(" years in the past and now");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerDateRange) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("between ");
int _dateBeginYears = ((PropertyFillerDateRange)o).getDateBeginYears();
_builder.append(_dateBeginYears, "");
_builder.append(" and ");
int _dateEndYears = ((PropertyFillerDateRange)o).getDateEndYears();
_builder.append(_dateEndYears, "");
_builder.append(" from now");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedDoubleRandom) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("random signed double");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedDoubleRange) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("singned double between ");
double _beginRange = ((PropertyFillerSignedDoubleRange)o).getBeginRange();
_builder.append(_beginRange, "");
_builder.append(" and ");
double _endRange = ((PropertyFillerSignedDoubleRange)o).getEndRange();
_builder.append(_endRange, "");
_builder.append(" with ");
int _decimals = ((PropertyFillerSignedDoubleRange)o).getDecimals();
_builder.append(_decimals, "");
_builder.append(" decimals");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedIntegerRandom) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("random signed integer");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedIntegerRange) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("singned integer between ");
int _beginRange = ((PropertyFillerSignedIntegerRange)o).getBeginRange();
_builder.append(_beginRange, "");
_builder.append(" and ");
int _endRange = ((PropertyFillerSignedIntegerRange)o).getEndRange();
_builder.append(_endRange, "");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextParagraphs) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
int _count = ((PropertyFillerTextParagraphs)o).getCount();
_builder.append(_count, "");
_builder.append(" paragraph(s)");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextRandom) {
_matched=true;
_switchResult = "random filler text";
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextSentences) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
int _count = ((PropertyFillerTextSentences)o).getCount();
_builder.append(_count, "");
_builder.append(" sentence(s)");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextWords) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
int _count = ((PropertyFillerTextWords)o).getCount();
_builder.append(_count, "");
_builder.append(" word(s)");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedDoubleRandom) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("random unsigned double");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedDoubleRange) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("unsingned double between ");
double _beginRange = ((PropertyFillerUnsignedDoubleRange)o).getBeginRange();
_builder.append(_beginRange, "");
_builder.append(" and ");
double _endRange = ((PropertyFillerUnsignedDoubleRange)o).getEndRange();
_builder.append(_endRange, "");
_builder.append(" with ");
int _decimals = ((PropertyFillerUnsignedDoubleRange)o).getDecimals();
_builder.append(_decimals, "");
_builder.append(" decimals");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedIntegerRandom) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("random unsigned integer");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedIntegerRange) {
_matched=true;
StringConcatenation _builder = new StringConcatenation();
_builder.append("unsingned integer between ");
int _beginRange = ((PropertyFillerUnsignedIntegerRange)o).getBeginRange();
_builder.append(_beginRange, "");
_builder.append(" and ");
int _endRange = ((PropertyFillerUnsignedIntegerRange)o).getEndRange();
_builder.append(_endRange, "");
_switchResult = _builder;
}
}
if (!_matched) {
if (o instanceof RunningDataInterchange) {
_matched=true;
DataInterchange _datainterchangeRef = ((RunningDataInterchange)o).getDatainterchangeRef();
String _name = _datainterchangeRef.getName();
_switchResult = this.generateText(o, "data interchange", _name);
}
}
if (!_matched) {
if (o instanceof RunningDataInterchanges) {
_matched=true;
_switchResult = "data interchanges";
}
}
if (!_matched) {
Object _xblockexpression = null;
{
Object r = super.text(o);
boolean _equals = Objects.equal(r, null);
if (_equals) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("text for ");
Class<?> _class = o.getClass();
String _canonicalName = _class.getCanonicalName();
_builder.append(_canonicalName, "");
System.err.println(_builder);
}
_xblockexpression = r;
}
_switchResult = _xblockexpression;
}
return _switchResult;
}
public Object image(final Object o) {
Image _switchResult = null;
boolean _matched = false;
if (!_matched) {
if (o instanceof EntityMockAttributeByObject) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("private_field.png", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockAttributeByReference) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("class.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockAttributeFiller) {
_matched=true;
PropertyFillerType _fillerType = ((EntityMockAttributeFiller)o).getFillerType();
_switchResult = this.getImage(_fillerType);
}
}
if (!_matched) {
if (o instanceof EntityMockEntities) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("dice-16.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockEntity) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("dice-16.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockEntityFunction) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("function.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockModel) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("dice-16.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockObject) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("private_method.png", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectArrayValue) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("enum.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectEmbed) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("private_field.png", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectEnum) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("enum_obj.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectFill) {
_matched=true;
PropertyFillerType _fillerType = ((EntityMockObjectFill)o).getFillerType();
_switchResult = this.getImage(_fillerType);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectItemValue) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("array.png", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockObjectPlainValue) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("array.png", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockObjects) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("private_method.png", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockPackage) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("package.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockReferencedObjectAttribute) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("private_field.png", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockResourceDataRow) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("enum_alt_obj.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockResources) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("enum_alt_obj.gif", _class);
}
}
if (!_matched) {
if (o instanceof EntityMockTemporary) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("private_method.png", _class);
}
}
if (!_matched) {
if (o instanceof DateIterate) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("date-iterate.png", _class);
}
}
if (!_matched) {
if (o instanceof Keyword) {
_matched=true;
_switchResult = null;
}
}
if (!_matched) {
if (o instanceof LImport) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("class.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerDateFuture) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("calendar-small.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerDatePast) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("calendar-small.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerDateRange) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("calendar-small.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedDoubleRandom) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("double.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedDoubleRange) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("double.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedIntegerRandom) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("int.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerSignedIntegerRange) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("int.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextParagraphs) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("var_string.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextRandom) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("var_string.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextSentences) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("var_string.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerTextWords) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("var_string.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedDoubleRandom) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("double.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedDoubleRange) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("double.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedIntegerRandom) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("int.gif", _class);
}
}
if (!_matched) {
if (o instanceof PropertyFillerUnsignedIntegerRange) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("int.gif", _class);
}
}
if (!_matched) {
if (o instanceof RunningDataInterchange) {
_matched=true;
Image _xifexpression = null;
DataInterchange _datainterchangeRef = ((RunningDataInterchange)o).getDatainterchangeRef();
DataInterchangeFile _fileEndpoint = null;
if (_datainterchangeRef!=null) {
_fileEndpoint=_datainterchangeRef.getFileEndpoint();
}
if ((_fileEndpoint instanceof DataInterchangeFileCSV)) {
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_xifexpression = this.getInternalImage("csv.png", _class);
} else {
Image _xifexpression_1 = null;
DataInterchange _datainterchangeRef_1 = ((RunningDataInterchange)o).getDatainterchangeRef();
DataInterchangeFile _fileEndpoint_1 = null;
if (_datainterchangeRef_1!=null) {
_fileEndpoint_1=_datainterchangeRef_1.getFileEndpoint();
}
if ((_fileEndpoint_1 instanceof DataInterchangeFileEDI)) {
Class<? extends EntityMockDSLLabelProvider> _class_1 = this.getClass();
_xifexpression_1 = this.getInternalImage("edi.png", _class_1);
} else {
Image _xifexpression_2 = null;
DataInterchange _datainterchangeRef_2 = ((RunningDataInterchange)o).getDatainterchangeRef();
DataInterchangeFile _fileEndpoint_2 = null;
if (_datainterchangeRef_2!=null) {
_fileEndpoint_2=_datainterchangeRef_2.getFileEndpoint();
}
if ((_fileEndpoint_2 instanceof DataInterchangeFileXML)) {
Class<? extends EntityMockDSLLabelProvider> _class_2 = this.getClass();
_xifexpression_2 = this.getInternalImage("xml.png", _class_2);
} else {
Class<? extends EntityMockDSLLabelProvider> _class_3 = this.getClass();
_xifexpression_2 = this.getInternalImage("data_interchange.png", _class_3);
}
_xifexpression_1 = _xifexpression_2;
}
_xifexpression = _xifexpression_1;
}
_switchResult = _xifexpression;
}
}
if (!_matched) {
if (o instanceof RunningDataInterchanges) {
_matched=true;
Class<? extends EntityMockDSLLabelProvider> _class = this.getClass();
_switchResult = this.getInternalImage("dsl_datainterchange.png", _class);
}
}
if (!_matched) {
Object _xblockexpression = null;
{
StringConcatenation _builder = new StringConcatenation();
_builder.append("image for ");
Class<?> _class = o.getClass();
String _canonicalName = _class.getCanonicalName();
_builder.append(_canonicalName, "");
System.err.println(_builder);
_xblockexpression = null;
}
_switchResult = ((Image)_xblockexpression);
}
return _switchResult;
}
}