| /** |
| * 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.LImport; |
| import org.eclipse.osbp.dsl.semantic.entity.LEntityAttribute; |
| 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.EntityMockTemplate; |
| 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.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); |
| } |
| |
| @Override |
| public Object text(final Object o) { |
| Object _switchResult = null; |
| boolean _matched = false; |
| if (o instanceof EntityMockAttributeByObject) { |
| _matched=true; |
| _switchResult = this.generateText(o, "attribute by object", ((EntityMockAttributeByObject)o).getAttributeRef().getName()); |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockAttributeByReference) { |
| _matched=true; |
| _switchResult = this.generateText(o, "attribute by reference", ((EntityMockAttributeByReference)o).getAttributeRef().getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockAttributeFiller) { |
| _matched=true; |
| _switchResult = this.generateText(o, "attribute filler", ((EntityMockAttributeFiller)o).getAttributeRef().getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockEntities) { |
| _matched=true; |
| _switchResult = "mocked entity model"; |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockEntity) { |
| _matched=true; |
| _switchResult = this.generateText(o, "entity", ((EntityMockEntity)o).getEntityRef().getName()); |
| } |
| } |
| 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; |
| _switchResult = this.generateText(o, "object", ((EntityMockObject)o).getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectArrayValue) { |
| _matched=true; |
| _switchResult = this.generateText(o, "array value", ((EntityMockObjectArrayValue)o).getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectEmbed) { |
| _matched=true; |
| _switchResult = this.generateText(o, "object embed", ((EntityMockObjectEmbed)o).getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectEnum) { |
| _matched=true; |
| _switchResult = this.generateText(o, "object enum", ((EntityMockObjectEnum)o).getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectFill) { |
| _matched=true; |
| _switchResult = this.generateText(o, "object fill", ((EntityMockObjectFill)o).getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectItemValue) { |
| _matched=true; |
| _switchResult = this.generateText(o, "item value", ((EntityMockObjectItemValue)o).getDatarow().getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectPlainValue) { |
| _matched=true; |
| _switchResult = this.generateText(o, "plain value", ((EntityMockObjectPlainValue)o).getName()); |
| } |
| } |
| 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; |
| { |
| String r = ((EntityMockReferencedObjectAttribute)o).getTemplate().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("."); |
| String _text = this.getText(((EntityMockReferencedObjectAttribute)o).getAttribute()); |
| _builder_1.append(_text); |
| _xblockexpression = _builder_1.toString(); |
| } |
| _switchResult = _xblockexpression; |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockResource) { |
| _matched=true; |
| _switchResult = this.generateText(o, "resource", ((EntityMockResource)o).getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockResources) { |
| _matched=true; |
| _switchResult = "mock resources"; |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockResourceDataRow) { |
| _matched=true; |
| _switchResult = this.generateText(o, "data row", ((EntityMockResourceDataRow)o).getName()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockTemplate) { |
| _matched=true; |
| _switchResult = this.generateText(o, "template", ((EntityMockTemplate)o).getName()); |
| } |
| } |
| 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; |
| _switchResult = this.generateText(o, "import", ((LImport)o).getImportedNamespace()); |
| } |
| } |
| 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; |
| _switchResult = this.generateText(o, "data interchange", ((RunningDataInterchange)o).getDatainterchangeRef().getName()); |
| } |
| } |
| 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 "); |
| String _canonicalName = o.getClass().getCanonicalName(); |
| _builder.append(_canonicalName); |
| System.err.println(_builder); |
| } |
| _xblockexpression = r; |
| } |
| _switchResult = _xblockexpression; |
| } |
| return _switchResult; |
| } |
| |
| @Override |
| public Object image(final Object o) { |
| Image _switchResult = null; |
| boolean _matched = false; |
| if (o instanceof EntityMockAttributeByObject) { |
| _matched=true; |
| _switchResult = this.getInternalImage("private_field.png", this.getClass()); |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockAttributeByReference) { |
| _matched=true; |
| _switchResult = this.getInternalImage("class.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockAttributeFiller) { |
| _matched=true; |
| _switchResult = this.getImage(((EntityMockAttributeFiller)o).getFillerType()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockEntities) { |
| _matched=true; |
| _switchResult = this.getInternalImage("dice-16.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockEntity) { |
| _matched=true; |
| _switchResult = this.getInternalImage("dice-16.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockEntityFunction) { |
| _matched=true; |
| _switchResult = this.getInternalImage("function.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockModel) { |
| _matched=true; |
| _switchResult = this.getInternalImage("dice-16.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObject) { |
| _matched=true; |
| _switchResult = this.getInternalImage("private_method.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectArrayValue) { |
| _matched=true; |
| _switchResult = this.getInternalImage("enum.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectEmbed) { |
| _matched=true; |
| _switchResult = this.getInternalImage("private_field.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectEnum) { |
| _matched=true; |
| _switchResult = this.getInternalImage("enum_obj.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectFill) { |
| _matched=true; |
| _switchResult = this.getImage(((EntityMockObjectFill)o).getFillerType()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectItemValue) { |
| _matched=true; |
| _switchResult = this.getInternalImage("array.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjectPlainValue) { |
| _matched=true; |
| _switchResult = this.getInternalImage("array.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockObjects) { |
| _matched=true; |
| _switchResult = this.getInternalImage("private_method.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockPackage) { |
| _matched=true; |
| _switchResult = this.getInternalImage("package.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockReferencedObjectAttribute) { |
| _matched=true; |
| _switchResult = this.getInternalImage("private_field.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockResourceDataRow) { |
| _matched=true; |
| _switchResult = this.getInternalImage("enum_alt_obj.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockResources) { |
| _matched=true; |
| _switchResult = this.getInternalImage("enum_alt_obj.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof EntityMockTemplate) { |
| _matched=true; |
| _switchResult = this.getInternalImage("private_method.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof DateIterate) { |
| _matched=true; |
| _switchResult = this.getInternalImage("date-iterate.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof Keyword) { |
| _matched=true; |
| _switchResult = null; |
| } |
| } |
| if (!_matched) { |
| if (o instanceof LImport) { |
| _matched=true; |
| _switchResult = this.getInternalImage("class.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerDateFuture) { |
| _matched=true; |
| _switchResult = this.getInternalImage("calendar-small.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerDatePast) { |
| _matched=true; |
| _switchResult = this.getInternalImage("calendar-small.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerDateRange) { |
| _matched=true; |
| _switchResult = this.getInternalImage("calendar-small.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerSignedDoubleRandom) { |
| _matched=true; |
| _switchResult = this.getInternalImage("double.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerSignedDoubleRange) { |
| _matched=true; |
| _switchResult = this.getInternalImage("double.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerSignedIntegerRandom) { |
| _matched=true; |
| _switchResult = this.getInternalImage("int.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerSignedIntegerRange) { |
| _matched=true; |
| _switchResult = this.getInternalImage("int.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerTextParagraphs) { |
| _matched=true; |
| _switchResult = this.getInternalImage("var_string.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerTextRandom) { |
| _matched=true; |
| _switchResult = this.getInternalImage("var_string.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerTextSentences) { |
| _matched=true; |
| _switchResult = this.getInternalImage("var_string.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerTextWords) { |
| _matched=true; |
| _switchResult = this.getInternalImage("var_string.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerUnsignedDoubleRandom) { |
| _matched=true; |
| _switchResult = this.getInternalImage("double.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerUnsignedDoubleRange) { |
| _matched=true; |
| _switchResult = this.getInternalImage("double.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerUnsignedIntegerRandom) { |
| _matched=true; |
| _switchResult = this.getInternalImage("int.gif", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| if (o instanceof PropertyFillerUnsignedIntegerRange) { |
| _matched=true; |
| _switchResult = this.getInternalImage("int.gif", this.getClass()); |
| } |
| } |
| 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)) { |
| _xifexpression = this.getInternalImage("csv.png", this.getClass()); |
| } 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)) { |
| _xifexpression_1 = this.getInternalImage("edi.png", this.getClass()); |
| } 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)) { |
| _xifexpression_2 = this.getInternalImage("xml.png", this.getClass()); |
| } else { |
| _xifexpression_2 = this.getInternalImage("data_interchange.png", this.getClass()); |
| } |
| _xifexpression_1 = _xifexpression_2; |
| } |
| _xifexpression = _xifexpression_1; |
| } |
| _switchResult = _xifexpression; |
| } |
| } |
| if (!_matched) { |
| if (o instanceof RunningDataInterchanges) { |
| _matched=true; |
| _switchResult = this.getInternalImage("dsl_datainterchange.png", this.getClass()); |
| } |
| } |
| if (!_matched) { |
| Object _xblockexpression = null; |
| { |
| StringConcatenation _builder = new StringConcatenation(); |
| _builder.append("image for "); |
| String _canonicalName = o.getClass().getCanonicalName(); |
| _builder.append(_canonicalName); |
| System.err.println(_builder); |
| _xblockexpression = null; |
| } |
| _switchResult = ((Image)_xblockexpression); |
| } |
| return _switchResult; |
| } |
| } |