Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.eclipse.emf.exporter.html;
  
  import java.util.*;
  import  org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
  
  public class PackageHTML
 {
   protected static String nl;
   public static synchronized PackageHTML create(String lineSeparator)
   {
      = lineSeparator;
     PackageHTML result = new PackageHTML();
      = null;
     return result;
   }
 
   public final String NL =  == null ? (System.getProperties().getProperty("line.separator")) : ;
   protected final String TEXT_1 = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" +  + "<html xmlns=\"http://www.w3.org/1999/xhtml\">" +  + "\t<head>" +  + "\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />" +  + "\t\t<title>";
   protected final String TEXT_2 = "</title>" +  + "\t\t" +  + "\t\t<style>" +  + "\t\t<!--" +  + "\t\t\tbody {font-size: 10pt; clip: rect(); margin-top: 5mm; margin-left: 3mm}" +  + "\t\t\th1 {font-size: 22px; font-weight: bold; color:white; background-color:#595791}" +  + "\t\t\th2 {font-size: 16pt; font-weight: bold ; line-height: 20px; background-color:#FFFFCF}" +  + "\t\t\th3 {font-size: 12pt}" +  + "\t\t\tp, table, td, th {font-size: 10pt}" +  + "\t\t\tcode {font-size: 10pt}" +  + "\t\t\tli {font-size: 10pt; line-height: 20px}" +  + "\t\t\t" +  + "\t\t\ttable.details {font: 11px/24px Verdana, Arial, Helvetica, sans-serif; border-collapse: collapse; width: 480px;}" +  + "\t\t\ttable.details td.left  {order-bottom: 1px solid #CCC;\tpadding: 0 0.5em; vertical-align: text-top;}" +  + "\t\t\ttable.details td.right {order-bottom: 1px solid #CCC;\tpadding: 0 0.5em; text-align: right; vertical-align: text-top;}" +  + "\t\t\ttable.details tr.documentation {background: #f9fff9;}" +  + "\t\t\ttable.details tr.odd           {background: #e3f0f7;}" +  + "\t\t\ttable.details tr.even          {background: #f7f7f7;}" +  + "\t\t-->" +  + "\t\t</style>" +  + "\t\t" +  + "\t\t<script language=\"JavaScript\" type=\"text/javascript\">" +  + "\t\t<!--" +  + "\t\t\tfunction openSection(sectionId, open)" +  + "\t\t\t{" +  + "\t\t\t\tvar section = document.getElementById(sectionId);" +  + "\t\t\t\tsection.style.display = open ? 'block' : 'none';" +  + "\t\t\t}" +  + "\t\t\t" +  + "\t\t\tfunction selectAllChechboxes(elements, select)" +  + "\t\t\t{" +  + "\t\t\t\tfor (var i = 0; i < elements.length; i++)" +  + "\t\t\t\t{" +  + "\t\t\t\t\telements[i].checked = select;" +  + "\t\t\t\t\topenSection(elements[i].value, select);" +  + "\t\t\t\t}" +  + "\t\t\t}" +  + "\t\t// -->" +  + "\t\t</script>" +  + "\t</head>" +  + "" +  + "\t<body lang=\"EN-US\"><form name=\"packform\" method=\"post\">" +  + "\t\t<h1>Package: <i>";
   protected final String TEXT_3 = "</i></h1>" +  + "\t\t\t<table border=\"1\" cellpadding=\"2\" cellspacing=\"0\" summary=\"Package details.\">" +  + "\t\t\t";
   protected final String TEXT_4 =  + "\t\t\t\t<tr>" +  + "\t\t\t\t\t<td>Super Package</td>" +  + "\t\t\t";
   protected final String TEXT_5 =  + "\t\t\t\t\t<td><a href=\"";
   protected final String TEXT_6 = "\">";
   protected final String TEXT_7 = "</a></td>" +  + "\t\t\t";
   protected final String TEXT_8 =  + "\t\t\t\t\t<td>";
   protected final String TEXT_9 = "</td>" +  + "\t\t\t";
   protected final String TEXT_10 =  + "\t\t\t\t</tr>" +  + "\t\t\t";
   protected final String TEXT_11 =  + "\t\t\t\t<tr>" +  + "\t\t\t\t\t<td>Ecore URI</td>" +  + "\t\t\t\t\t<td>";
   protected final String TEXT_12 = "</td>" +  + "\t\t\t\t</tr>" +  + "\t\t\t\t<tr>" +  + "\t\t\t\t\t<td>GenModel URI</td>" +  + "\t\t\t\t\t<td>";
   protected final String TEXT_13 = "</td>" +  + "\t\t\t\t</tr>" +  + "\t\t\t\t<tr>" +  + "\t\t\t\t\t<td>Namespace URI</td>" +  + "\t\t\t\t\t<td>";
   protected final String TEXT_14 = "</td>" +  + "\t\t\t\t</tr>" +  + "\t\t\t\t<tr>" +  + "\t\t\t\t\t<td>Namespace Prefix</td>" +  + "\t\t\t\t\t<td>";
   protected final String TEXT_15 = "</td>" +  + "\t\t\t\t</tr>" +  + "\t\t";
   protected final String TEXT_16 =  + "\t\t\t\t<tr>" +  + "\t\t\t\t\t<td>Documentation</td>" +  + "\t\t\t\t\t<td>";
   protected final String TEXT_17 = "</td>" +  + "\t\t\t\t</tr>" +  + "\t\t";
   protected final String TEXT_18 =  + "\t\t\t</table>" +  + "" +  + "\t\t\t<p><input type=\"checkbox\" onclick=\"javascript:selectAllChechboxes(document.packform.detailCheckbox, this.checked)\"/>expand all details</p>" + ;
   protected final String TEXT_19 =  + "\t\t<h1>Classes</h1>";
   protected final String TEXT_20 =  + "\t\t\t<h2>";
   protected final String TEXT_21 = "</h2>" +  + "\t\t";
   protected final String TEXT_22 =  + "\t\t\t\t<h3>Documentation</h3>" +  + "\t\t\t\t\t";
   protected final String TEXT_23 =  + "\t\t";
   protected final String TEXT_24 =  + "\t\t\t\t<h3>Details</h3>" +  + "\t\t\t\t<dt>" +  + "\t\t\t\t\t<dd><table class=\"details\">";
   protected final String TEXT_25 =  + "\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_26 = "\"><td class=\"left\">constraints</td><td class=\"right\">";
   protected final String TEXT_27 = "</td></tr>";
   protected final String TEXT_28 =  + "\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_29 = "\"><td class=\"left\">";
   protected final String TEXT_30 = "</td><td class=\"right\"><tt>";
   protected final String TEXT_31 = "</tt></td></tr>";
   protected final String TEXT_32 =  + "\t\t\t\t\t</table></dd>" +  + "\t\t\t\t</dt>" +  + "\t\t";
   protected final String TEXT_33 =  + "\t\t\t\t<h3>Super Classes</h3>" +  + "\t\t\t\t\t<ul>";
   protected final String TEXT_34 =  + "\t\t\t\t\t\t<li><tt>";
   protected final String TEXT_35 = "</tt></li>";
   protected final String TEXT_36 =  + "\t\t\t\t\t</ul>" +  + "\t\t";
   protected final String TEXT_37 =  + "\t\t";
   protected final String TEXT_38 =  + "\t\t\t\t<h3>Attributes</h3>" +  + "\t\t\t\t\t<ul>";
   protected final String TEXT_39 =  + "\t\t\t\t\t\t<li>" +  + "\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"detailCheckbox\" value=\"detail";
   protected final String TEXT_40 = "\" onclick=\"javascript:openSection(this.value, this.checked)\"/> ";
   protected final String TEXT_41 =  + "\t\t\t\t\t\t\t<div id=\"detail";
   protected final String TEXT_42 = "\" name=\"detail";
   protected final String TEXT_43 = "\" style=\"overflow:hidden;display:none\">" +  + "\t\t\t\t\t\t\t\t<table class=\"details\">";
   protected final String TEXT_44 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"documentation\"><td class=\"left\" colspan=\"2\">";
   protected final String TEXT_45 = "</td></tr>";
   protected final String TEXT_46 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_47 = "\"><td class=\"left\">constraints</td><td class=\"right\">";
   protected final String TEXT_48 = "</td></tr>";
   protected final String TEXT_49 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_50 = "\"><td class=\"left\">";
   protected final String TEXT_51 = "</td><td class=\"right\"><tt>";
   protected final String TEXT_52 = "</tt></td></tr>";
   protected final String TEXT_53 =  + "\t\t\t\t\t\t\t\t</table><br />" +  + "\t\t\t\t\t\t\t</div>" +  + "\t\t\t\t\t\t</li>";
   protected final String TEXT_54 =  + "\t\t\t\t\t</ul>" +  + "\t\t";
   protected final String TEXT_55 =  + "\t\t";
   protected final String TEXT_56 =  + "\t\t\t\t<h3>References</h3>" +  + "\t\t\t\t\t<ul>";
   protected final String TEXT_57 =  + "\t\t\t\t\t\t<li>" +  + "\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"detailCheckbox\" value=\"detail";
   protected final String TEXT_58 = "\" onclick=\"javascript:openSection(this.value, this.checked)\"/> ";
   protected final String TEXT_59 =  + "\t\t\t\t\t\t\t<div id=\"detail";
   protected final String TEXT_60 = "\" name=\"detail";
   protected final String TEXT_61 = "\" style=\"overflow:hidden;display:none\">" +  + "\t\t\t\t\t\t\t\t<table class=\"details\">";
   protected final String TEXT_62 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"documentation\"><td class=\"left\" colspan=\"2\">";
   protected final String TEXT_63 = "</td></tr>";
   protected final String TEXT_64 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_65 = "\"><td class=\"left\">constraints</td><td class=\"right\">";
   protected final String TEXT_66 = "</td></tr>";
   protected final String TEXT_67 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_68 = "\"><td class=\"left\">opposite</td><td class=\"right\">";
   protected final String TEXT_69 = "</td></tr> ";
   protected final String TEXT_70 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_71 = "\"><td class=\"left\">key(s)</td><td class=\"right\">";
   protected final String TEXT_72 = "</td></tr> ";
   protected final String TEXT_73 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
   protected final String TEXT_74 = "\"><td class=\"left\">";
   protected final String TEXT_75 = "</td><td class=\"right\"><tt>";
   protected final String TEXT_76 = "</tt></td></tr>";
   protected final String TEXT_77 =  + "\t\t\t\t\t\t\t\t</table><br />" +  + "\t\t\t\t\t\t\t</div>" +  + "\t\t\t\t\t\t</li>";
   protected final String TEXT_78 =  + "\t\t\t\t\t</ul>" +  + "\t\t";
   protected final String TEXT_79 =  + "\t\t";
  protected final String TEXT_80 =  + "\t\t\t\t<h3>Operations</h3>" +  + "\t\t\t\t\t<ul>";
  protected final String TEXT_81 =  + "\t\t\t\t\t\t<li>" +  + "\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"detailCheckbox\" value=\"detail";
  protected final String TEXT_82 = "\" onclick=\"javascript:openSection(this.value, this.checked)\"/> ";
  protected final String TEXT_83 =  + "\t\t\t\t\t\t\t<div id=\"detail";
  protected final String TEXT_84 = "\" name=\"detail";
  protected final String TEXT_85 = "\" style=\"overflow:hidden;display:none\">" +  + "\t\t\t\t\t\t\t\t<table class=\"details\">";
  protected final String TEXT_86 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"documentation\"><td class=\"left\" colspan=\"2\">";
  protected final String TEXT_87 = "</td></tr>";
  protected final String TEXT_88 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
  protected final String TEXT_89 = "\"><td class=\"left\">constraints</td><td class=\"right\">";
  protected final String TEXT_90 = "</td></tr>";
  protected final String TEXT_91 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
  protected final String TEXT_92 = "\"><td class=\"left\">";
  protected final String TEXT_93 = "</td><td class=\"right\"><tt>";
  protected final String TEXT_94 = "</tt></td></tr>";
  protected final String TEXT_95 =  + "\t\t\t\t\t\t\t\t</table><br />" +  + "\t\t\t\t\t\t\t</div>" +  + "\t\t\t\t\t\t</li>";
  protected final String TEXT_96 =  + "\t\t\t\t\t</ul>" +  + "\t\t";
  protected final String TEXT_97 =  + "\t";
  protected final String TEXT_98 = ;
  protected final String TEXT_99 = "\t\t" +  + "\t\t<h1>Enumerations</h1>";
  protected final String TEXT_100 =  + "\t\t\t<h2><a name=\"";
  protected final String TEXT_101 = "\">";
  protected final String TEXT_102 = "</a></h2>";
  protected final String TEXT_103 =  + "\t\t";
  protected final String TEXT_104 =  + "\t\t\t\t<h3>Documentation</h3>" +  + "\t\t\t\t\t";
  protected final String TEXT_105 =  + "\t\t";
  protected final String TEXT_106 =  + "\t\t\t\t<h3>Literals</h3>" +  + "\t\t\t\t\t<ul>";
  protected final String TEXT_107 =  + "\t\t\t\t\t\t<li>" +  + "\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"detailCheckbox\" value=\"detail";
  protected final String TEXT_108 = "\" onclick=\"javascript:openSection(this.value, this.checked)\"/> ";
  protected final String TEXT_109 =  + "\t\t\t\t\t\t\t<div id=\"detail";
  protected final String TEXT_110 = "\" name=\"detail";
  protected final String TEXT_111 = "\" style=\"overflow:hidden;display:none\">" +  + "\t\t\t\t\t\t\t\t<table class=\"details\">";
  protected final String TEXT_112 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"documentation\"><td class=\"left\" colspan=\"2\">";
  protected final String TEXT_113 = "</td></tr>";
  protected final String TEXT_114 =  + "\t\t\t\t\t\t\t\t\t<tr class=\"";
  protected final String TEXT_115 = "\"><td class=\"left\">";
  protected final String TEXT_116 = "</td><td class=\"right\"><tt>";
  protected final String TEXT_117 = "</tt></td></tr>";
  protected final String TEXT_118 =  + "\t\t\t\t\t\t\t\t</table><br />" +  + "\t\t\t\t\t\t\t</div>" +  + "\t\t\t\t\t\t</li>";
  protected final String TEXT_119 =  + "\t\t\t\t\t</ul>";
  protected final String TEXT_120 = ;
  protected final String TEXT_121 = "\t\t" +  + "\t\t<h1>Data Types</h1>";
  protected final String TEXT_122 =  + "\t\t\t<h2>";
  protected final String TEXT_123 = "</h2>" +  + "\t\t";
  protected final String TEXT_124 =  + "\t\t\t\t<h3>Documentation</h3>" +  + "\t\t\t\t\t";
  protected final String TEXT_125 =  + "\t\t";
  protected final String TEXT_126 =  + "\t\t\t\t<h3>Details</h3>" +  + "\t\t\t\t<dt>" +  + "\t\t\t\t\t<dd>" +  + "\t\t\t\t\t\t<table class=\"details\">";
  protected final String TEXT_127 =  + "\t\t\t\t\t\t\t<tr class=\"";
  protected final String TEXT_128 = "\"><td class=\"left\">";
  protected final String TEXT_129 = "</td><td class=\"right\"><tt>";
  protected final String TEXT_130 = "</tt></td></tr>";
  protected final String TEXT_131 =  + "\t\t\t\t\t\t</table>" +  + "\t\t\t\t\t</dd>";
  protected final String TEXT_132 =  + "\t\t\t\t</dt>";
  protected final String TEXT_133 =  + "\t</form></body>" +  + "</html>";
  protected final String TEXT_134 = ;
  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    
Copyright (c) 2006-2009 IBM Corporation and others. 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: IBM - Initial API and implementation
    HTMLExporter htmlExporter = (HTMLExporter)argument;
    GenPackage genPackage = htmlExporter.getCurrentGenPackage();
    EPackage ePackage = genPackage.getEcorePackage();
    stringBuffer.append();
    stringBuffer.append(genPackage.getQualifiedPackageName());
    stringBuffer.append();
    stringBuffer.append(genPackage.getQualifiedPackageName());
    stringBuffer.append();
    GenPackage superGenPackage = genPackage.getSuperGenPackage(); if (superGenPackage != null) { URI packageArtifactURI = htmlExporter.getPackageArtifacttURI(superGenPackage.getEcorePackage());
    stringBuffer.append();
    if (packageArtifactURI != null) {
    stringBuffer.append();
    stringBuffer.append(packageArtifactURI.toString());
    stringBuffer.append();
    stringBuffer.append(superGenPackage.getQualifiedPackageName());
    stringBuffer.append();
    } else {
    stringBuffer.append();
    stringBuffer.append(superGenPackage.getQualifiedPackageName());
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    stringBuffer.append(ePackage.eResource().getURI().toString());
    stringBuffer.append();
    stringBuffer.append(genPackage.getGenModel().eResource().getURI().toString());
    stringBuffer.append();
    stringBuffer.append(ePackage.getNsURI());
    stringBuffer.append();
    stringBuffer.append(ePackage.getNsPrefix());
    stringBuffer.append();
    String packageDocumentation = EcoreUtil.getDocumentation(ePackage); if (packageDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(htmlExporter.getLongText(packageDocumentation));
    stringBuffer.append();
    }
    stringBuffer.append();
    int detailsCounter=0; Collection<EClasseClasses = EcoreUtil.getObjectsByType(ePackage.getEClassifiers(), ..);
    if (!eClasses.isEmpty()) {
    stringBuffer.append();
    for (EClass eClass : eClasses) { 
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeClassifierLabel(eClass));
    stringBuffer.append();
    String classDocumentation = EcoreUtil.getDocumentation(eClass); if (classDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(htmlExporter.getLongText(classDocumentation));
    stringBuffer.append();
    }
    stringBuffer.append();
    int row=0; String classConstraints = htmlExporter.computeConstraints(eClass); if (classConstraints != null) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(classConstraints);
    stringBuffer.append();
    } for (EStructuralFeature detail : htmlExporter.getDetails(eClass)) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(detail.getName());
    stringBuffer.append();
    stringBuffer.append(HTMLExporter.escape(eClass.eGet(detail).toString()));
    stringBuffer.append();
    }
    stringBuffer.append();
    if (!eClass.getEGenericSuperTypes().isEmpty()) {
    stringBuffer.append();
    for (EGenericType eSuperType : eClass.getEGenericSuperTypes()) {
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeLabel(eSuperType));
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    if (!eClass.getEAttributes().isEmpty()) {
    stringBuffer.append();
    for (EAttribute eAttribute : eClass.getEAttributes()) {
    stringBuffer.append();
    stringBuffer.append(++detailsCounter);
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeTypedElementLabel(eAttribute));
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    String attributeDocumentation = EcoreUtil.getDocumentation(eAttribute); if (attributeDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(attributeDocumentation);
    stringBuffer.append();
    } row=0; String attributeConstraints = htmlExporter.computeConstraints(eAttribute); if (attributeConstraints != null) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(attributeConstraints);
    stringBuffer.append();
    } for (EStructuralFeature detail : htmlExporter.getDetails(eAttribute)) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(detail.getName());
    stringBuffer.append();
    stringBuffer.append(eAttribute.eGet(detail));
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    if (!eClass.getEReferences().isEmpty()) {
    stringBuffer.append();
    for (EReference eReference : eClass.getEReferences()) {
    stringBuffer.append();
    stringBuffer.append(++detailsCounter);
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeTypedElementLabel(eReference));
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    String referenceDocumentation = EcoreUtil.getDocumentation(eReference); if (referenceDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(referenceDocumentation);
    stringBuffer.append();
    } row=0; String referenceConstraints = htmlExporter.computeConstraints(eReference); if (referenceConstraints != null) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(referenceConstraints);
    stringBuffer.append();
    } if (eReference.getEOpposite() != null) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeLabel(eReference.getEOpposite()));
    stringBuffer.append();
    } if (!eReference.getEKeys().isEmpty()) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeEKeys(eReference));
    stringBuffer.append();
    } for (EStructuralFeature detail : htmlExporter.getDetails(eReference)) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(detail.getName());
    stringBuffer.append();
    stringBuffer.append(eReference.eGet(detail));
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    if (!eClass.getEOperations().isEmpty()) {
    stringBuffer.append();
    for (EOperation eOperation : eClass.getEOperations()) {
    stringBuffer.append();
    stringBuffer.append(++detailsCounter);
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeLabel(eOperation));
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    String operationDocumentation = EcoreUtil.getDocumentation(eOperation); if (operationDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(operationDocumentation);
    stringBuffer.append();
    } row=0; String operationConstraints = htmlExporter.computeConstraints(eOperation); if (operationConstraints != null) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(operationConstraints);
    stringBuffer.append();
    } for (EStructuralFeature detail : htmlExporter.getDetails(eOperation)) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(detail.getName());
    stringBuffer.append();
    stringBuffer.append(eOperation.eGet(detail));
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    }
    stringBuffer.append();
    Collection<EEnumeEnums = EcoreUtil.getObjectsByType(ePackage.getEClassifiers(), ..);
    if (!eEnums.isEmpty()) {
    stringBuffer.append();
    for (EEnum eEnum : eEnums) {
    stringBuffer.append();
    stringBuffer.append(eEnum.getName());
    stringBuffer.append();
    stringBuffer.append(eEnum.getName());
    stringBuffer.append();
    if (!eEnum.getELiterals().isEmpty()) {
    stringBuffer.append();
    String enumDocumentation = EcoreUtil.getDocumentation(eEnum); if (enumDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(htmlExporter.getLongText(enumDocumentation));
    stringBuffer.append();
    }
    stringBuffer.append();
    for (EEnumLiteral eEnumLiteral : eEnum.getELiterals()) {
    stringBuffer.append();
    stringBuffer.append(++detailsCounter);
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeLabel(eEnumLiteral));
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    stringBuffer.append(detailsCounter);
    stringBuffer.append();
    String enumLiteralDocumentation = EcoreUtil.getDocumentation(eEnumLiteral); if (enumLiteralDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(enumLiteralDocumentation);
    stringBuffer.append();
    } int row = 0; for (EStructuralFeature detail : htmlExporter.getDetails(eEnumLiteral)) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(detail.getName());
    stringBuffer.append();
    stringBuffer.append(eEnumLiteral.eGet(detail));
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    }
    }
    stringBuffer.append();
    Collection<EDataTypeeDataTypes = EcoreUtil.getObjectsByType(ePackage.getEClassifiers(), ..); eDataTypes.removeAll(eEnums);
    if (!eDataTypes.isEmpty()) {
    stringBuffer.append();
    for (EDataType eDataType : eDataTypes) {
    stringBuffer.append();
    stringBuffer.append(htmlExporter.computeClassifierLabel(eDataType));
    stringBuffer.append();
    String dataTypeDocumentation = EcoreUtil.getDocumentation(eDataType); if (dataTypeDocumentation != null) {
    stringBuffer.append();
    stringBuffer.append(htmlExporter.getLongText(dataTypeDocumentation));
    stringBuffer.append();
    }
    stringBuffer.append();
    int row = 0; for (EStructuralFeature detail : htmlExporter.getDetails(eDataType)) {
    stringBuffer.append();
    stringBuffer.append((++row)%2 == 0 ? "even" : "odd");
    stringBuffer.append();
    stringBuffer.append(detail.getName());
    stringBuffer.append();
    stringBuffer.append(HTMLExporter.escape(eDataType.eGet(detail).toString()));
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    }
    stringBuffer.append();
    stringBuffer.append();
    return stringBuffer.toString();
  }
New to GrepCode? Check out our FAQ X