text:
'use strict';

process.env.TEST = true;

const loaders = require('./webpack/loaders');
const postcssInit = require('./webpack/postcss');
const plugins = require('./webpack/plugins');

module.exports = (config) => {
  const coverage = config.singleRun ? ['coverage'] : [];

  config.set({
    frameworks: [
      'jasmine',
    ],

    plugins: [
      'karma-jasmine',
      'karma-sourcemap-writer',
      'karma-sourcemap-loader',
      'karma-webpack',
      'karma-coverage',
      'karma-remap-istanbul',
      'karma-spec-reporter',
      'karma-chrome-launcher',
    ],

    files: [
      './src/tests.entry.ts',
      {
        pattern: '**/*.map',
        served: true,
        included: false,
        watched: true,
      },
    ],

    preprocessors: {
      './src/tests.entry.ts': [
        'webpack',
        'sourcemap',
      ],
      './src/**/!(*.test|tests.*).(ts|js)': [
        'sourcemap',
      ],
    },

    webpack: {
      plugins,
      postcss: postcssInit,
      entry: './src/tests.entry.ts',
      devtool: 'inline-source-map',
      verbose: false,
      resolve: {
        extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
      },
      module: {
        loaders: combinedLoaders(),
        postLoaders: config.singleRun
          ? [ loaders.istanbulInstrumenter ]
          : [ ],
      },
      stats: { colors: true, reasons: true },
      debug: false,
    },

    webpackServer: {
      noInfo: true, // prevent console spamming when running in Karma!
    },

    reporters: ['spec']
      .concat(coverage)
      .concat(coverage.length > 0 ? ['karma-remap-istanbul'] : []),

    remapIstanbulReporter: {
      src: 'coverage/chrome/coverage-final.json',
      reports: {
        html: 'coverage',
      },
    },

    coverageReporter: {
      reporters: [
        { type: 'json' },
      ],
      dir: './coverage/',
      subdir: (browser) => {
        return browser.toLowerCase().split(/[ /-]/)[0]; // returns 'chrome'
      },
    },

    port: 9999,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'], // Alternatively: 'PhantomJS'
    captureTimeout: 6000,
  });
};

function combinedLoaders() {
  return Object.keys(loaders).reduce(function reduce(aggregate, k) {
    switch (k) {
    case 'istanbulInstrumenter':
    case 'tslint':
      return aggregate;
    case 'ts':
    case 'tsTest':
      return aggregate.concat([ // force inline source maps
        Object.assign(loaders[k],
          { query: { babelOptions: { sourceMaps: 'both' } } })]);
    default:
      return aggregate.concat([loaders[k]]);
    }
  },
  []);
}


text:
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using CoBuilder.Core.Domain;
using CoBuilder.Core.Interfaces;

namespace CoBuilder.Core.Collections
{
    /// <summary>
    /// Class ProductsCollection.
    /// </summary>
    /// <seealso cref="System.Collections.ObjectModel.ReadOnlyCollection{CoBuilder.Core.Domain.BimProduct}" />
    /// <seealso cref="CoBuilder.Core.Interfaces.IProductsCollection" />
    public class ProductsCollection : ReadOnlyCollection<BimProduct>, IProductsCollection
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ProductsCollection"/> class.
        /// </summary>
        /// <param name="products">The products.</param>
        public ProductsCollection(IList<BimProduct> products): base(products)
        {
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
[![Build Status](https://travis-ci.org/zradke/ZCRMailbox.svg?branch=master)](https://travis-ci.org/zradke/ZCRMailbox)

KVO subscription inspired by [FBKVOController](https://github.com/facebook/KVOController) and [MAKVONotificationCenter](https://github.com/mikeash/MAKVONotificationCenter), with compatibility back to iOS5.

===

## Requirements

You will need to have a minimum deployment target of iOS 5.0+ or OSX 10.7+, and be running under ARC, or know how to selectively enable ARC on specific files.

## Getting set up

Here's how to get ZCRMailbox up and running:

* Drag-n-drop
* Cocoapods
* Build a framework (iOS only)

Struggling in a sea of options? Allow me to strongly suggest using Cocoapods!

Regardless of which method you choose, you can start working with ZCRMailbox by importing it where you need:

```
#import "ZCRMailbox.h"
```

### Drag-n-drop

This project is really just two files: **ZCRMailbox.h** and **ZCRMailbox.m**. You can find them by cloning the repo and dragging them from the `Classes` directory into your Xcode project. Just make sure the "Copy items into destination group's folder (if needed)" checkbox is checked as well as whatever targets you need to use them in. Oh, and it's very unlikely, but if the names clash you may need to rename the files.

### Cocoapods

Need more info on Cocoapods? Check out their [website](http://cocoapods.org/) for more information on what its used for and how to get it running.

When you're done with that, or if you're already familiar with Cocoapods, just add

```
pod "ZCRMailbox"
```

to your `Podfile`, run `pod install` and you're good to go!

If you're working on a serious project, it's recommended to specify at least a major and minor version in your `Podfile`, ala: `pod "ZCRMailbox", "~> 0.1"`.

### Build a framework (iOS only)

Framework fan? Clone the repo and open the `Project/ZCRMailbox.xcodeproj` up in Xcode. Change the target to `Framework` and build. Navigate to the Organizer and in the "Projects" tab, locate the ZCRMailbox project. Click the minuscule arrow next to the "Derived Data" file path to open it in Finder. The correct folder should be highlighted and named something like `ZCRMailbox-<GOBBLEDYGOOK>`. Navigate into there then into `Build/Products/Release-<PLATFORM>` and finally you should see `ZCRMailbox.framework`. Phew.

Get a drink to celebrate, then drag the framework somewhere much easier to find.

Now that you have the packaged framework you can drag it into your projects, zip it up and ship it to friends, or just keep it around for fun.

===

## Putting it to use

### Creating a mailbox

Create a `ZCRMailbox` with a subscriber:

```
ZCRMailbox *mailbox = [[ZCRMailBox alloc] initWithSubscriber:subscriber]
```

Because the subscriber is only weakly referenced, it can be a good idea for the subscriber to keep hold of it's mailbox:

```
self.mailbox = [[ZCRMailbox alloc] initWithSubscriber:self];
```

If you need to deliver notifier messages to the subscriber on a specific queue, you can do that too:

```
self.mailbox.messageQueue = [NSOperationQueue mainQueue];
```

### Working with a mailbox

Once you have a mailbox you can start adding subscriptions to objects, called notifiers:

```
NSKeyValueObservingOptions options = NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew;
[self.mailbox subscribeTo:newsletter keyPath:@"updatedDate" options:options block:^(ZCRMessage *message) {
	// Do something
}];
```

You can add subscriptions to as many notifiers and key-paths as you'd like, all from one mailbox!

If you prefer selectors to blocks, give one of these a try:

```
[self.mailbox subscribeTo:newsletter keyPath:@"updatedDate" options:options selector:@selector(newsletterDidUpdateDate)];
[self.mailbox subscribeTo:newsletter keyPath:@"posts" options:options selector:@selector(newsletterDidUpdatePost:))];
...
- (void)newsletterDidUpdateDate { // Do stuff }
- (void)newsletterDidUpdatePost:(ZCRMessage *)message { // Do stuff }
```

Finally, if you are migrating traditional KVO code and want a quick plug-in solution until you can get selectors and blocks working, there's this:

```
static void *ABCSubscriberKVOContext = &ABCSubscriberKVOContext;
...
[self.mailbox subscribeTo:newsletter keyPath:@"updatedDate" options:options context:ABCSubscriberKVOContext];
...
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
    if (context == ABCSubscriberKVOContext) {
        // Optionally convert this to a message
        ZCRMessage *message = [[ZCRMessage alloc] initWithNotifier:object keyPath:keyPath change:change];
        // Do something
    } else {
        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
    }
}
```

Not very pretty, but it'll do in a pinch. The context is optional, but traditionally a good idea to make sure the notification is the one you want to receive.

### Cleanup

When you're done with a mailbox, you can simply let it deallocate. This will automatically cancel all subscriptions.

If you need to unsubscribe but still want to work with the mailbox, you can use the unsubscribe methods:

```
[self.mailbox unsubscribeFrom:newsletter keyPath:@"updatedDate"];
[self.mailbox unsubscribeFrom:newsletter];
[self.mailbox unsubscribeFromAll];
```

===

## Testing

ZCRMailbox has unit tests using XCTest, and is continuously integrated using [Travis CI](https://travis-ci.org/zradke/ZCRMailbox). To run the tests yourself, first clone the repo. You can then either run the tests from within Xcode or from the command line.

#### Inside Xcode

Open up `Project/ZCRMailbox.xcodeproj` and make sure the scheme is set to "ZCRMailbox." Run the tests by selecting `Product/Test` from the top menu or using the shortcut `CMD+U`.

#### From the command line

First install [xctool](https://github.com/facebook/xctool). Then from within the project directory, run `rake test`.

## Deep-dive

Want more details on how the sausage gets made? This section will discuss some of the implementation details of ZCRMailbox.

### Architecture

* `ZCRMailbox` weakly references the subscriber and maintains a dictionary of strongly referenced notifiers as keys for sets of `_ZCRSubscription` objects
* `_ZCRSubscription` weakly references the `ZCRMailbox` that created it and other details about the KVO observation.
* To add and remove subscriptions, `ZCRMailbox` defers to the `_ZCRPostOffice` which is shared between all mailboxes.
* `_ZCRPostOffice` actually handles all KVO observation and observation-removal to ensure thread safety. It maintains a set of `_ZCRSubscription` objects sent by `ZCRMailbox` instances.

### Thread safety

* Simple `NSRecursiveLock` instances are used to maintain thread safety.
* Since all subscription is handled by the single locked `_ZCRPostOffice`, `ZCRMailbox` instances can be created, subscribe, and unsubscribe on different threads without having to worry.

### Performance

Because KVO subscription and un-subscription is expected to be synchronous, simple locking was used instead of a dispatch queue with multiple readers and a single writer. This would not be an issue if each `ZCRMailbox` actually handled its own KVO notifications, since an individual mailbox is not expected to receive a large volume of subscriptions or un-subscriptions. However, to prevent zombie KVO updates past the lifecycle of an observation, all updates are funneled through the shared `_ZCRPostOffice` which must synchronously handle all subscriptions. This can create a bottleneck if a large volume of subscriptions and un-subscriptions are occurring across all `ZCRMailbox` instances. The practical impact of this is unclear, but you are encouraged to profile these classes if you experience performance issues.


text:
"use strict";

var $ptd = (function($ptd) {
    var $ptd = $ptd || {};

    $ptd.ready = function(callback) {
        // apologies to jquery - http://jquery.org/
        var dcl = function() {
          document.removeEventListener("DOMContentLoaded", dcl);
          callback();
        }

        if(document.readyState === "complete") {
          // document is already ready (already)
          callback();
        } else {
          document.addEventListener("DOMContentLoaded", dcl);
        }
    }

    $ptd.on = function(eventType, selector, delegate, callback) {
        // this is to implement a jquery-style 'on' with a delegate for dynamically added content
        var list = document.querySelectorAll(selector);
        for (var i=0; i<list.length; i++) {
            list[i].addEventListener(eventType, function(event) {
                // note to browser developers: implement matches!
                if(event.target.matches) {
                    if(event.target.matches(delegate)) {
                        callback(event);
                    }
                } else if (event.target.msMatchesSelector) {
                    if(event.target.msMatchesSelector(delegate)) {
                        callback(event);
                    }
                } else if (event.target.webkitMatchesSelector) {
                    if(event.target.webkitMatchesSelector(delegate)) {
                        callback(event);
                    }
                } else if (event.target.mozMatchesSelector) {
                    if(event.target.mozMatchesSelector(delegate)) {
                        callback(event);
                    }
                }
            });
        }
    }

    return $ptd;
})($ptd);


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSecretary.Utilities;

namespace SuperSecretary.Handlers
{
    public class Id3ArtistHandler : IHandler
    {
        public string Name
        {
            get
            {
                return "Artist";
            }
        }

        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                var tags = Id3Utilities.GetTags(fileName);
                result.Value = tags.JoinedAlbumArtists;
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return result;
        }
    }
}


text:
.class public abstract Landroid/view/IOnKeyguardExitResult$Stub;
.super Landroid/os/Binder;
.source "IOnKeyguardExitResult.java"

# interfaces
.implements Landroid/view/IOnKeyguardExitResult;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/view/IOnKeyguardExitResult;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x409
    name = "Stub"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/view/IOnKeyguardExitResult$Stub$Proxy;
    }
.end annotation

# static fields
.field private static final DESCRIPTOR:Ljava/lang/String; = "android.view.IOnKeyguardExitResult"

.field static final TRANSACTION_onKeyguardExitResult:I = 0x1

# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 15
    invoke-direct {p0}, Landroid/os/Binder;-><init>()V

    .line 16
    const-string v0, "android.view.IOnKeyguardExitResult"

    invoke-virtual {p0, p0, v0}, Landroid/view/IOnKeyguardExitResult$Stub;->attachInterface(Landroid/os/IInterface;Ljava/lang/String;)V

    .line 17
    return-void
.end method

.method public static asInterface(Landroid/os/IBinder;)Landroid/view/IOnKeyguardExitResult;
    .locals 2
    .param p0, "obj"    # Landroid/os/IBinder;

    .prologue
    .line 24
    if-nez p0, :cond_0

    .line 25
    const/4 v0, 0x0

    .line 31
    :goto_0
    return-object v0

    .line 27
    :cond_0
    const-string v1, "android.view.IOnKeyguardExitResult"

    invoke-interface {p0, v1}, Landroid/os/IBinder;->queryLocalInterface(Ljava/lang/String;)Landroid/os/IInterface;

    move-result-object v0

    .line 28
    .local v0, "iin":Landroid/os/IInterface;
    if-eqz v0, :cond_1

    instance-of v1, v0, Landroid/view/IOnKeyguardExitResult;

    if-eqz v1, :cond_1

    .line 29
    check-cast v0, Landroid/view/IOnKeyguardExitResult;

    goto :goto_0

    .line 31
    :cond_1
    new-instance v0, Landroid/view/IOnKeyguardExitResult$Stub$Proxy;

    .end local v0    # "iin":Landroid/os/IInterface;
    invoke-direct {v0, p0}, Landroid/view/IOnKeyguardExitResult$Stub$Proxy;-><init>(Landroid/os/IBinder;)V

    goto :goto_0
.end method

# virtual methods
.method public asBinder()Landroid/os/IBinder;
    .locals 0

    .prologue
    .line 35
    return-object p0
.end method

.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
    .locals 3
    .param p1, "code"    # I
    .param p2, "data"    # Landroid/os/Parcel;
    .param p3, "reply"    # Landroid/os/Parcel;
    .param p4, "flags"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v1, 0x1

    .line 39
    sparse-switch p1, :sswitch_data_0

    .line 55
    invoke-super {p0, p1, p2, p3, p4}, Landroid/os/Binder;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    move-result v1

    :goto_0
    return v1

    .line 43
    :sswitch_0
    const-string v2, "android.view.IOnKeyguardExitResult"

    invoke-virtual {p3, v2}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V

    goto :goto_0

    .line 48
    :sswitch_1
    const-string v2, "android.view.IOnKeyguardExitResult"

    invoke-virtual {p2, v2}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    .line 50
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v2

    if-eqz v2, :cond_0

    move v0, v1

    .line 51
    .local v0, "_arg0":Z
    :goto_1
    invoke-virtual {p0, v0}, Landroid/view/IOnKeyguardExitResult$Stub;->onKeyguardExitResult(Z)V

    goto :goto_0

    .line 50
    .end local v0    # "_arg0":Z
    :cond_0
    const/4 v0, 0x0

    goto :goto_1

    .line 39
    nop

    :sswitch_data_0
    .sparse-switch
        0x1 -> :sswitch_1
        0x5f4e5446 -> :sswitch_0
    .end sparse-switch
.end method


text:
\hypertarget{_abstract_exception_8java}{}\section{/home/haowu/uran/src/uran/err/\+Abstract\+Exception.java File Reference}
\label{_abstract_exception_8java}\index{/home/haowu/uran/src/uran/err/\+Abstract\+Exception.\+java@{/home/haowu/uran/src/uran/err/\+Abstract\+Exception.\+java}}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item
class \hyperlink{classuran_1_1err_1_1_abstract_exception}{uran.\+err.\+Abstract\+Exception}
\end{DoxyCompactItemize}
\subsection*{Packages}
\begin{DoxyCompactItemize}
\item
package \hyperlink{namespaceuran_1_1err}{uran.\+err}
\end{DoxyCompactItemize}


text:
.class public Lmf/org/w3c/dom/ranges/RangeException;
.super Ljava/lang/RuntimeException;
.source "RangeException.java"

# static fields
.field public static final BAD_BOUNDARYPOINTS_ERR:S = 0x1s

.field public static final INVALID_NODE_TYPE_ERR:S = 0x2s

# instance fields
.field public code:S

# direct methods
.method public constructor <init>(SLjava/lang/String;)V
    .locals 1

    invoke-direct {p0, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    int-to-short v0, p1

    iput-short v0, p0, Lmf/org/w3c/dom/ranges/RangeException;->code:S

    return-void
.end method


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>org.hibernate.engine.query.spi (Hibernate JavaDocs)</title>
<meta name="date" content="2014-03-03">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

org.hibernate.engine.query.spi

Interfaces

ParameterParser.Recognizer

Classes

EntityGraphQueryHint

FilterQueryPlan

HQLQueryPlan

NamedParameterDescriptor

NativeSQLQueryPlan

OrdinalParameterDescriptor

ParameterMetadata

ParameterParser

ParamLocationRecognizer

ParamLocationRecognizer.NamedParameterDescription

QueryPlanCache

ReturnMetadata


text:
<!DOCTYPE HTML>
<!--
  Tested control/class: sap.ui.commons.form.GridLayout
  Author: SAP
-->

<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<script src="../shared-config.js"></script>
	<script id="sap-ui-bootstrap"
		type="text/javascript"
		src="../../../../../resources/sap-ui-core.js"
		data-sap-ui-theme="sap_bluecrystal"
		data-sap-ui-noConflict="true"
		data-sap-ui-libs="sap.ui.commons">
	</script>
	<link rel="stylesheet" href="../../../../../resources/sap/ui/thirdparty/qunit.css" type="text/css" media="screen">
	<script src="../../../../../resources/sap/ui/thirdparty/qunit.js"></script>
	<script src="../../../../../resources/sap/ui/qunit/qunit-junit.js"></script>
	<script src="../../../../../resources/sap/ui/qunit/qunit-coverage.js"></script>
	<script src="../../../../../resources/sap/ui/qunit/QUnitUtils.js"></script>

	<script>

		// create Form

		var oLayout1 = new sap.ui.commons.form.GridLayout("Layout1");

		var oForm = new sap.ui.commons.form.Form("F1",{
			title: new sap.ui.commons.Title("F1T",{text: "Form Title", icon: "../images/controls/sap.ui.commons.form.Form.gif", tooltip: "Title tooltip"}),
			layout: oLayout1,
			formContainers: [
				// container with text-title
				new sap.ui.commons.form.FormContainer("C1",{
					title: "Container1",
					tooltip: "Container tooltip",
					formElements: [
						// elements with auto size
						new sap.ui.commons.form.FormElement("C1E1",{
							label: "Label1",
							fields: [new sap.ui.commons.TextField("C1E1_T1",{required:true})]
						}),
						new sap.ui.commons.form.FormElement("C1E2",{
							label: new sap.ui.commons.Label("C1E2_L1",{text:"Label2"}),
							fields: [new sap.ui.commons.TextField("C1E2_T1"),
							         new sap.ui.commons.TextField("C1E2_T2",{required:true})]
						}),
						new sap.ui.commons.form.FormElement("C1E3",{
							label: new sap.ui.commons.Label("C1E3_L1",{text:"Label3", icon:"../images/help.gif", layoutData: new sap.ui.commons.form.GridElementData({hCells: "auto"})}),
							fields: [new sap.ui.commons.TextField("C1E3_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "auto"})}),
							         new sap.ui.commons.TextField("C1E3_T2",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "auto"})}),
							         new sap.ui.commons.TextField("C1E3_T3",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "auto"})})]
							}),
						// elements with fix size
						new sap.ui.commons.form.FormElement("C1E4",{
							label: "Label4",
							fields: [new sap.ui.commons.TextField("C1E4_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "3"})})]
						}),
						new sap.ui.commons.form.FormElement("C1E5",{
							label: "Label5",
							fields: [new sap.ui.commons.TextField("C1E5_T1",{layoutData: new sap.ui.core.VariantLayoutData({multipleLayoutData: [new sap.ui.commons.form.GridElementData({hCells: "3"})]})}),
							         new sap.ui.commons.TextField("C1E5_T2",{layoutData: new sap.ui.core.VariantLayoutData({multipleLayoutData: [new sap.ui.commons.form.GridElementData({hCells: "3"})]})})]
						}),
						// mixed elements
						new sap.ui.commons.form.FormElement("C1E6",{
							label: new sap.ui.commons.Label("C1E6_L1",{text:"Label6", layoutData: new sap.ui.commons.form.GridElementData({hCells: "2"})}),
							fields: [new sap.ui.commons.TextField("C1E6_T1",{value:"hello", layoutData: new sap.ui.commons.form.GridElementData({hCells: "3"})}),
							         new sap.ui.commons.TextField("C1E6_T2", {enabled: false}),
							         new sap.ui.commons.TextField("C1E6_T3",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "3"})})]
						}),
						// elements without label
						new sap.ui.commons.form.FormElement("C1E7",{
							fields: [new sap.ui.commons.TextField("C1E7_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "3"})}),
							         new sap.ui.commons.TextField("C1E7_T2", {editable: false}),
							         new sap.ui.commons.TextField("C1E7_T3",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "3"})})]
						}),
						// full size element
						new sap.ui.commons.form.FormElement("C1E8",{
							label: new sap.ui.commons.Label("C1E8_L1",{text:"Label8"}),
							fields: [new sap.ui.commons.TextArea("C1E8_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "full"})})]
						}),
						// full size element without label
						new sap.ui.commons.form.FormElement("C1E9",{
							fields: [new sap.ui.commons.TextArea("C1E9_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "full",vCells:2})})]
						}),
						// elements using vCells
						new sap.ui.commons.form.FormElement("C1E10",{
							label: new sap.ui.commons.Label({text:"Label 10"}),
							fields: [new sap.ui.commons.TextArea("C1E10_T1",{height: "72px", layoutData: new sap.ui.commons.form.GridElementData({vCells: 3})}),
							         new sap.ui.commons.TextArea("C1E10_T2",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells: "3",vCells: 2})}),
							         new sap.ui.commons.TextArea("C1E10_T3",{height: "22px", layoutData: new sap.ui.commons.form.GridElementData({vCells: 1})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E11",{
							fields: [new sap.ui.commons.TextArea("C1E11_T1",{height: "22px", layoutData: new sap.ui.commons.form.GridElementData({vCells: 1})}),
							         new sap.ui.commons.TextArea("C1E11_T2",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({vCells: 2})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E12",{
							label: new sap.ui.commons.Label({text:"Label 12"}),
							fields: [new sap.ui.commons.TextArea("C1E12_T1",{height: "22px", layoutData: new sap.ui.commons.form.GridElementData({vCells: 1})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E13",{
							label: new sap.ui.commons.Label({text:"Label 13"}),
							fields: [new sap.ui.commons.TextArea("C1E13_T1",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells:"13",vCells: 2})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E14",{
							label: new sap.ui.commons.Label({text:"Label 14"}),
							fields: [new sap.ui.commons.TextField("C1E14_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "1"})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E15",{
							fields: [new sap.ui.commons.TextArea("C1E15_T1",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells:"13",vCells: 2})}),
							         new sap.ui.commons.TextArea("C1E15_T2",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells:"3",vCells: 2})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E16",{
							label: "Label 16",
							fields: [new sap.ui.commons.TextField("C1E16_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "1"})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E17",{
							label: "Label 17",
							fields: [new sap.ui.commons.TextArea("C1E17_T1",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells:"3",vCells: 2})})
												]
						}),
						new sap.ui.commons.form.FormElement("C1E18"), //empty element to put nex field in next row
						new sap.ui.commons.form.FormElement("C1E19",{
							label: new sap.ui.commons.Label("C1E19_L",{text:"Label 19"}),
							fields: [new sap.ui.commons.TextField("C1E19_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "1"})})
												]
						})
						]
					}),
					// half size grids
					new sap.ui.commons.form.FormContainer("C2",{
						title: new sap.ui.commons.Title("C2T",{text: "Title as Control", icon: "../images/controls/sap.ui.commons.form.Form.gif", tooltip: "Title tooltip"}),
						formElements: [
										new sap.ui.commons.form.FormElement("C2E1",{
											label: new sap.ui.commons.Label("C2E1_L1",{text:"Label20"}),
											fields: [new sap.ui.commons.TextField("C2E1_T1",{required:true})]
										})
						],
						layoutData: new sap.ui.commons.form.GridContainerData({halfGrid: true})
					}),
					new sap.ui.commons.form.FormContainer("C3",{
						title: new sap.ui.commons.Title("C3T",{text: "Title as Control"}),
						expandable: true,
						formElements: [
										new sap.ui.commons.form.FormElement("C3E1",{
											label: new sap.ui.commons.Label("C3E1_L1",{text:"Label21"}),
											fields: [new sap.ui.commons.TextField("C3E1_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "3"})}),
											         new sap.ui.commons.TextField("C3E1_T2",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "auto"})})]
										}),
										new sap.ui.commons.form.FormElement("C3E2",{
											label: new sap.ui.commons.Label("C3E2_L1",{text:"Label22"}),
											fields: [new sap.ui.commons.TextArea("C3E2_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "full"})})]
										})
						],
						layoutData: new sap.ui.core.VariantLayoutData({multipleLayoutData: [new sap.ui.commons.form.GridContainerData({halfGrid: true})]})
					}),
					// half size grids for vCell testing
					new sap.ui.commons.form.FormContainer("C4",{
						title: "vCells test left",
						formElements: [
										new sap.ui.commons.form.FormElement("C4E1",{
											label: "Label23",
											fields: [new sap.ui.commons.TextField("C4E1_T1")]
										}),
										new sap.ui.commons.form.FormElement("C4E2",{
											label: "Label24",
											fields: [new sap.ui.commons.TextField("C4E2_T1")]
										}),
										new sap.ui.commons.form.FormElement("C4E3",{
											label: "Label25",
											fields: [new sap.ui.commons.TextField("C4E3_T1")]
										}),
										new sap.ui.commons.form.FormElement("C4E4",{
											label: "Label26",
											fields: [new sap.ui.commons.TextArea("C4E4_T1",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells: "5", vCells: 2})})]
										}),
										new sap.ui.commons.form.FormElement("C4E5",{
											label: "Label27",
											fields: [new sap.ui.commons.TextArea("C4E5_T1",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells: "2", vCells: 2})})]
										}),
										new sap.ui.commons.form.FormElement("C4E6"),
										new sap.ui.commons.form.FormElement("C4E7",{
											label: "Label28",
											fields: [new sap.ui.commons.TextField("C4E7_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "1"})})]
										})
						],
						layoutData: new sap.ui.commons.form.GridContainerData({halfGrid: true})
					}),
					new sap.ui.commons.form.FormContainer("C5",{
						title: "vCells test right",
						formElements: [
										new sap.ui.commons.form.FormElement("C5E1",{
											label: "Label29",
											fields: [new sap.ui.commons.TextArea("C5E1_T1",{height: "47px", layoutData: new sap.ui.commons.form.GridElementData({hCells: "full", vCells: 2})})]
										}),
										new sap.ui.commons.form.FormElement("C5E2",{
											label: "Label30",
											fields: [new sap.ui.commons.TextField("C5E2_T1")]
										}),
										new sap.ui.commons.form.FormElement("C5E3")
						],
						layoutData: new sap.ui.commons.form.GridContainerData({halfGrid: true})
					}),
					// only one half grif per row and without title
					new sap.ui.commons.form.FormContainer("C6",{
						formElements: [
										new sap.ui.commons.form.FormElement("C6E1",{
											label: new sap.ui.commons.Label("C6E1_L1",{text:"Label31"}),
											fields: [new sap.ui.commons.Image("C6E1_I1", {src: "../images/SAPLogo.gif", layoutData: new sap.ui.commons.form.GridElementData({hCells: "2"})})]
										}),
										new sap.ui.commons.form.FormElement("C6E2",{
											label: new sap.ui.commons.Label("C6E2_L1",{text:"Label32"}),
											fields: [new sap.ui.commons.TextArea("C6E2_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "2", vCells: 3})})]
										}),
										new sap.ui.commons.form.FormElement("C6E3",{
											visible: false,
											label: new sap.ui.commons.Label("C6E3_L1",{text:"Label"}),
											fields: [new sap.ui.commons.TextField("C6E3_T1",{value: "invisible"})]
										})
						],
						layoutData: new sap.ui.commons.form.GridContainerData({halfGrid: true})
					}),
					// Error testing
					new sap.ui.commons.form.FormContainer("C7",{
						title: "Error handling",
						formElements: [
										new sap.ui.commons.form.FormElement("C7E1",{
											label: new sap.ui.commons.Label("C7E1_L1",{text:"Label33"}),
											fields: [new sap.ui.commons.TextField("C7E1_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "10"})}),
											         new sap.ui.commons.TextField("C7E1_T2",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "10"})})]
										}),
										new sap.ui.commons.form.FormElement("C7E2",{
											label: new sap.ui.commons.Label("C7E2_L1",{text:"Label34"}),
											fields: [new sap.ui.commons.TextField("C7E2_T1",{value: "1"}),
											         new sap.ui.commons.TextField("C7E2_T2",{value: "2"}),
											         new sap.ui.commons.TextField("C7E2_T3",{value: "3"}),
											         new sap.ui.commons.TextField("C7E2_T4",{value: "4"}),
											         new sap.ui.commons.TextField("C7E2_T5",{value: "5"}),
											         new sap.ui.commons.TextField("C7E2_T6",{value: "6"}),
											         new sap.ui.commons.TextField("C7E2_T7",{value: "7"}),
											         new sap.ui.commons.TextField("C7E2_T8",{value: "8"}),
											         new sap.ui.commons.TextField("C7E2_T9",{value: "9"}),
											         new sap.ui.commons.TextField("C7E2_T10",{value: "10"}),
											         new sap.ui.commons.TextField("C7E2_T11",{value: "11"}),
											         new sap.ui.commons.TextField("C7E2_T12",{value: "12"}),
											         new sap.ui.commons.TextField("C7E2_T13",{value: "13"}),
											         new sap.ui.commons.TextField("C7E2_T14",{value: "14"}),
											         new sap.ui.commons.TextField("C7E2_T15",{value: "15"})]
										}),
										new sap.ui.commons.form.FormElement("C7E3",{
											label: new sap.ui.commons.Label("C7E3_L1",{text:"Label35"}),
											fields: [new sap.ui.commons.TextField("C7E3_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "12"})}),
											         new sap.ui.commons.TextField("C7E3_T2"),
											         new sap.ui.commons.TextField("C7E3_T3")]
										}),
										new sap.ui.commons.form.FormElement("C7E4",{
											label: new sap.ui.commons.Label("C7E4_L1",{text:"Label36"}),
											fields: [new sap.ui.commons.TextArea("C7E4_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "2", vCells:2})}),
											         new sap.ui.commons.TextField("C7E4_T2")]
										}),
										new sap.ui.commons.form.FormElement("C7E5",{
											label: new sap.ui.commons.Label("C7E5_L1",{text:"Label37"}),
											fields: [new sap.ui.commons.TextField("C7E5_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "full"})})]
										}),
										new sap.ui.commons.form.FormElement("C7E6",{
											label: new sap.ui.commons.Label("C7E6_L1",{text:"Label38"}),
											fields: [new sap.ui.commons.TextArea("C7E6_T1",{layoutData: new sap.ui.commons.form.GridElementData({hCells: "2", vCells: 3})})]
										}),
										new sap.ui.commons.form.FormElement("C7E7",{
											visible: false,
											label: new sap.ui.commons.Label("C7E7_L1",{text:"Label39"}),
											fields: [new sap.ui.commons.TextField("C7E7_T1",{value: "invisible"})]
										})
						]
					}),
					// invisible container
					new sap.ui.commons.form.FormContainer("C8",{
						title: "Invisible container",
						visible: false,
						formElements: [
										new sap.ui.commons.form.FormElement("C8E1",{
											label: new sap.ui.commons.Label("C8E1_L1",{text:"Label40"}),
											fields: [new sap.ui.commons.TextField("C8E1_T1")]
										})
						]
					})
				]
			}).placeAt("uiArea1");

		var oLayout2 = new sap.ui.commons.form.GridLayout("Layout2");

		var oForm2 = new sap.ui.commons.form.Form("F2",{
			title: new sap.ui.commons.Title("F2T",{text: "16 cells without separator", level: sap.ui.commons.TitleLevel.H1}),
			layout: oLayout2,
			formContainers: [
							new sap.ui.commons.form.FormContainer("F2C1",{
								formElements: [
												new sap.ui.commons.form.FormElement("F2C1E1",{
													label: "Label",
													fields: [new sap.ui.commons.TextField("F2C1E1_T1",{value: "1"}),
													         new sap.ui.commons.TextField("F2C1E1_T2",{value: "2"}),
													         new sap.ui.commons.TextField("F2C1E1_T3",{value: "3"}),
													         new sap.ui.commons.TextField("F2C1E1_T4",{value: "4"}),
													         new sap.ui.commons.TextField("F2C1E1_T5",{value: "5"}),
													         new sap.ui.commons.TextField("F2C1E1_T6",{value: "6"}),
													         new sap.ui.commons.TextField("F2C1E1_T7",{value: "7"}),
													         new sap.ui.commons.TextField("F2C1E1_T8",{value: "8"}),
													         new sap.ui.commons.TextField("F2C1E1_T9",{value: "9"}),
													         new sap.ui.commons.TextField("F2C1E1_T10",{value: "10"}),
													         new sap.ui.commons.TextField("F2C1E1_T11",{value: "11"}),
													         new sap.ui.commons.TextField("F2C1E1_T12",{value: "12"}),
													         new sap.ui.commons.TextField("F2C1E1_T13",{value: "13"})]
												})
								]
							})
				]
			}).placeAt("uiArea2");

		var oLayout3 = new sap.ui.commons.form.GridLayout("Layout3", {singleColumn: true});

		var oForm2 = new sap.ui.commons.form.Form("F3",{
			title: "8 cells without separator",
			layout: oLayout3,
			formContainers: [
							new sap.ui.commons.form.FormContainer("F3C1",{
								title: "full container",
								formElements: [
												new sap.ui.commons.form.FormElement("F3C1E1",{
													label: "Label",
													fields: [new sap.ui.commons.TextField("F3C1E1_T1",{value: "1"}),
													         new sap.ui.commons.TextField("F3C1E1_T2",{value: "2"}),
													         new sap.ui.commons.TextField("F3C1E1_T3",{value: "3"}),
													         new sap.ui.commons.TextField("F3C1E1_T4",{value: "4"}),
													         new sap.ui.commons.TextField("F3C1E1_T5",{value: "5"})]
												})
								]
							}),
							new sap.ui.commons.form.FormContainer("F3C2",{
								title: "Half container",
								formElements: [
												new sap.ui.commons.form.FormElement("F3C2E1",{
													label: "Label",
													fields: [new sap.ui.commons.TextField("F3C2E1_T1")]
												})
								],
								layoutData: new sap.ui.commons.form.GridContainerData({halfGrid: true})
							}),
							new sap.ui.commons.form.FormContainer("F3C3",{
								title: "another Half container",
								formElements: [
												new sap.ui.commons.form.FormElement("F3C3E1",{
													label: "Label",
													fields: [new sap.ui.commons.TextField("F3C3E1_T1"),
													         new sap.ui.commons.TextField("F3C3E1_T2")]
												}),
												new sap.ui.commons.form.FormElement("F3C3E2",{
													fields: [new sap.ui.commons.TextField("F3C3E2_T1", {value: "Test changing LayoutData"})]
												})
								],
								layoutData: new sap.ui.commons.form.GridContainerData({halfGrid: true})
							})
				]
			}).placeAt("uiArea3");

		var countCells = function(sID, iMax){
			var aRows = jQuery.sap.byId(sID).find("tr");
			var bOK = true;
			for( var i=0; i < aRows.length; i++){
				var aCells = jQuery(aRows[i]).children();
				var iCells = 0;
				for( var j=0; j < aCells.length; j++){
					var oCell = jQuery(aCells[j]);
					var sColspan = oCell.attr("colspan");
					if ( sColspan ){
						iCells = iCells + parseInt(sColspan);
					}else{
						iCells++;
					}
				}
				if (iCells > iMax){
					bOK = false;
				}
			}
			return bOK;
		}

		// test functions
		qutils.delayTestStart();

		QUnit.module("Rendering");

		QUnit.test("Grid", function(assert) {
			assert.ok(jQuery.sap.domById("F1"), "Form1 is rendered");
			assert.ok(jQuery.sap.domById("Layout1"), "Grid1 is rendered");
			assert.ok(jQuery("#Layout1").is("table"), "Grid1 is rendered as table");
			assert.ok(jQuery.sap.domById("F1T"), "Form1 title is rendered");
			assert.ok(jQuery("#F1T").is("h4"), "Form title is rendered as H4 as default");
			assert.ok(jQuery("#F1T").parent().is("th"), "Form1 title is in <TH>");
			assert.equal(jQuery("#F1T").parent().attr("colspan"), "17", "Form1 title is stretched over full width");
			assert.ok(jQuery("#F2T").is("h1"), "Form title is rendered as H1 as defined on control");
			assert.ok(countCells("F1",17), "All rows of Form1 have max. 17 cells");
			assert.ok(countCells("F2",16), "All rows of Form2 have max. 16 cells");
			assert.ok(countCells("F3",8), "All rows of Form3 have max. 8 cells");
		});

		QUnit.test("Container Full-Size", function(assert) {
			assert.ok(!jQuery.sap.domById("C1--Exp"), "Container1 no expander is rendered");
			assert.ok(jQuery('h5:contains("Container1")').get(0), "Title (as text) is renderd");
			assert.equal(jQuery('h5:contains("Container1")').parent().attr("title"), "Container tooltip", "Container tooltip is renderd");
		});

		QUnit.test("Element", function(assert) {
			assert.ok(jQuery.sap.domById("C1E1"), "Element is rendered");
			assert.ok(jQuery("#C1E1").is("tr"), "Element of foll size grid is rendered as table row");
			assert.ok(!jQuery.sap.domById("C7E7"), "invisible Element is not rendered");
		});

		QUnit.test("FormControls Full-Size", function(assert) {
			assert.ok(jQuery('label:contains("Label1")').get(0), "Label (as text) is renderd");
			assert.equal(jQuery('label:contains("Label1")').parent().attr("colspan"), "3", "Label 1 rendered over 3 grid cells");
			assert.ok(jQuery.sap.domById("C1E1_T1"), "TextField is rendered");
			assert.equal(jQuery("#C1E1_T1").get(0).style.width, "100%", "Element1: Field 1 rendered width = 100%");
			assert.equal(jQuery("#C1E1_T1").parent().attr("colspan"), "14", "Element1: Field 1 rendered over 14 grid cells");
			assert.ok(!jQuery("#C1E1_T1").parent().attr("rowspan") || (sap.ui.Device.browser.internet_explorer && jQuery("#C1E1_T1").parent().attr("rowspan") == "1"), "Element1: Field 1 no rowspan");
			assert.ok(jQuery.sap.domById("C1E2_L1"), "Label (as control) is rendered");
			assert.equal(jQuery("#C1E2_T1").parent().attr("colspan"), "7", "Element2: Field 1 rendered over 7 grid cells");
			assert.equal(jQuery("#C1E2_T2").parent().attr("colspan"), "7", "Element2: Field 2 rendered over 7 grid cells");
			assert.equal(jQuery("#C1E3_L1").parent().attr("colspan"), "3", "Element3: Label (with hCells=auto) rendered over 3 grid cells");
			assert.equal(jQuery("#C1E3_T1").parent().attr("colspan"), "4", "Element3: Field 1 rendered over 4 grid cells");
			assert.equal(jQuery("#C1E3_T2").parent().attr("colspan"), "5", "Element3: Field 2 rendered over 5 grid cells");
			assert.equal(jQuery("#C1E3_T3").parent().attr("colspan"), "5", "Element3: Field 3 rendered over 5 grid cells");
			assert.equal(jQuery("#C1E4_T1").parent().attr("colspan"), "3", "Element4: Field 1 (with hCells=3) rendered over 3 grid cells");
			assert.equal(jQuery("#C1E5_T1").parent().attr("colspan"), "3", "Element5: Field 1 (with hCells=3) rendered over 3 grid cells");
			assert.equal(jQuery("#C1E5_T2").parent().attr("colspan"), "4", "Element5: Field 2 (with hCells=3) rendered over 4 grid cells (including middle cell)");
			assert.equal(jQuery("#C1E6_L1").parent().attr("colspan"), "2", "Element6: Label (with hCells=2) rendered over 2 grid cells");
			assert.equal(jQuery("#C1E6_T1").parent().attr("colspan"), "3", "Element6: Field 1 (with hCells=3) rendered over 3 grid cells");
			assert.equal(jQuery("#C1E6_T2").parent().attr("colspan"), "9", "Element6: Field 2 (without hCells) rendered over 9 grid cells (including middle cell)");
			assert.equal(jQuery("#C1E6_T3").parent().attr("colspan"), "3", "Element6: Field 3 (with hCells=3) rendered over 3 grid cells");
			assert.equal(jQuery("#C1E7_T1").parent().attr("colspan"), "3", "Element7: Field 1 (with hCells=3) rendered over 3 grid cells");
			assert.equal(jQuery("#C1E7_T2").parent().attr("colspan"), "11", "Element7: Field 2 (without hCells) rendered over 11 grid cells (including middle cell)");
			assert.equal(jQuery("#C1E7_T3").parent().attr("colspan"), "3", "Element7: Field 3 (with hCells=3) rendered over 3 grid cells");
			assert.equal(jQuery("#C1E8_L1").parent().attr("colspan"), "17", "Element8: Label (with hCells=full) rendered over 17 grid cells");
			assert.equal(jQuery("#C1E8_T1").parent().attr("colspan"), "17", "Element8: Field 1 (with hCells=full) rendered over 17 grid cells");
			assert.equal(jQuery("#C1E9_T1").parent().attr("colspan"), "17", "Element9: Field 1 (with hCells=full) rendered over 17 grid cells");
			// vCells
			assert.ok(!jQuery("#C1E9_T1").parent().attr("rowspan") || (sap.ui.Device.browser.internet_explorer && jQuery("#C1E9_T1").parent().attr("rowspan") == "1"), "Element9: Field 1 (with hCells 0 full, vCells=2) rendered without rowspan");
			assert.equal(jQuery("#C1E10_T1").parent().attr("rowspan"), "3", "Element10: Field 1 (with vCells=3) rendered with rowspan 3");
			assert.equal(jQuery("#C1E10_T1").parent().attr("colspan"), "5", "Element10: Field 1 rendered over 5 grid cells");
			assert.equal(jQuery("#C1E10_T2").parent().attr("rowspan"), "2", "Element10: Field 2 (with vCells=2) rendered with rowspan 3");
			assert.equal(jQuery("#C1E10_T2").parent().attr("colspan"), "4", "Element10: Field 2  (with hCells=3) rendered over 4 grid cells (including middle cell)");
			assert.ok(!jQuery("#C1E10_T3").parent().attr("rowspan") || (sap.ui.Device.browser.internet_explorer && jQuery("#C1E10_T3").parent().attr("rowspan") == "1"), "Element10: Field 3 (with vCells=1) rendered without rowspan");
			assert.equal(jQuery("#C1E10_T3").parent().attr("colspan"), "5", "Element10: Field 5 rendered over 5 grid cells");
			assert.equal(jQuery(jQuery("#C1E11_T1").parent().parent().children()[0]).attr("colspan"), "3", "Element11: label cell rendered");
			assert.ok(!jQuery(jQuery("#C1E11_T1").parent().parent().children()[0]).children().get(0), "Element11: no label rendered");
			assert.ok(!jQuery("#C1E11_T1").parent().attr("rowspan") || (sap.ui.Device.browser.internet_explorer && jQuery("#C1E11_T1").parent().attr("rowspan") == "1"), "Element11: Field 1 (with vCells=1) rendered without rowspan");
			assert.equal(jQuery("#C1E11_T1").parent().attr("colspan"), "2", "Element11: Field 1 rendered over 2 grid cells");
			assert.equal(jQuery("#C1E11_T2").parent().attr("rowspan"), "2", "Element11: Field 2 (with vCells=3) rendered with rowspan 3");
			assert.equal(jQuery("#C1E11_T2").parent().attr("colspan"), "3", "Element11: Field 1 rendered over 3 grid cells");
			assert.ok(!jQuery("#C1E12_T1").parent().attr("rowspan") || (sap.ui.Device.browser.internet_explorer && jQuery("#C1E12_T1").parent().attr("rowspan") == "1"), "Element12: Field 1 (with vCells=1) rendered without rowspan");
			assert.equal(jQuery("#C1E12_T1").parent().attr("colspan"), "6", "Element12: Field 1 rendered over 6 grid cells");
			assert.equal(jQuery("#C1E13_T1").parent().attr("rowspan"), "2", "Element13: Field 1 (with vCells=2) rendered with rowspan 2");
			assert.equal(jQuery("#C1E13_T1").parent().parent().next().children().length, 0, "Empty dummy row rendered after full-size rowspan");
			assert.ok(jQuery.sap.domById("C1E14_T1"), "Element14: TextField is rendered");
			assert.equal(jQuery("#C1E15_T1").parent().attr("rowspan"), "2", "Element15: Field 1 (with vCells=2) rendered with rowspan 2");
			assert.equal(jQuery("#C1E15_T1").parent().parent().next().children().length, 0, "Empty dummy row rendered after full-size rowspan");
			assert.ok(jQuery.sap.domById("C1E16_T1"), "Element16: TextField is rendered");
			assert.ok(jQuery.sap.domById("C1E18"), "Element18: empty element is rendered");
			assert.equal(jQuery("#C1E17_T1").parent().parent().next().next().children().first().children().first().attr("id"), "C1E19_L", "Element19: Label rendered 2 rows below element 17");

			assert.ok(!jQuery.sap.domById("C8E1_T1"), "Content of invisible Container is not rendered");
		});

		QUnit.test("Container Half-Size", function(assert) {
			assert.ok(jQuery.sap.domById("C2T"), "Title2 (as Control) is rendered");
			assert.equal(jQuery("#C2T").attr("title"), "Title tooltip", "Title2 (as Control): tooltip is rendered");
			assert.ok(jQuery.sap.domById("C2T-ico"), "Title2 (as Control): image is rendered");
			assert.ok((jQuery("#C2T").parent().next().is("td") && !jQuery("#C2T").parent().next().hasClass("sapUiGridHeader")), "Separator cell is rendered")
			assert.equal(jQuery("#C2T").parent().next().children().length, 0, "Separator cell has no content");
			assert.ok(!jQuery.sap.domById("C3T-ico"), "Title3 (as Control): no image is rendered");

			assert.ok(!jQuery("#C6E1_L1").parent().parent().prev().children().first().hasClass("sapUiGridHeader"), "Container6 no header rendered");

			assert.equal(jQuery("#F3C2E1_T1").parent().attr("colspan"), "5", "Form3(singleColumn) - Container3 - Element1: Field 1 rendered over 5 grid cells (full size even half container)");
			assert.equal(jQuery("#F3C2E1_T1").parent().next().length, 0, "Form3(singleColumn) - Container3 - Element1: Field 1 - no field beside renderd");
			assert.ok(jQuery("#F3C2E1_T1").parent().parent().next().children().first().hasClass("sapUiGridHeader"), "Form3(singleColumn) - Container3 - Element1: next half container rendered below");

			// as button is loaded async, check if already there and rendered, if not, start test async
			if (sap.ui.require("sap/ui/commons/Button") && jQuery.sap.domById("C3--Exp")) {
				assert.ok(!jQuery.sap.domById("C2--Exp"), "Container2 no expander is rendered");
				assert.ok(jQuery.sap.domById("C3--Exp"), "Container3 expander is rendered");
			} else {
				var fnDone = assert.async();
				sap.ui.require(["sap/ui/commons/Button"], function() {
					sap.ui.getCore().applyChanges(); // to wait for re-rendering
					assert.ok(!jQuery.sap.domById("C2--Exp"), "Container2 no expander is rendered");
					assert.ok(jQuery.sap.domById("C3--Exp"), "Container3 expander is rendered");
					fnDone();
				});
			}
		});

		QUnit.test("FormControls Half-Size", function(assert) {
			assert.equal(jQuery("#C2E1_T1").parent().attr("colspan"), "5", "Container2 - Element1: Field 1 rendered over 5 grid cells");
			assert.ok((jQuery("#C3E2_L1").parent().prev().prev().is("td") && jQuery("#C3E2_L1").parent().prev().prev().attr("colspan") == "8" && jQuery("#C3E2_L1").parent().prev().prev().children().length == 0), "Container2 - empty dummy cell rendered");

			assert.equal(jQuery("#C3E1_T1").parent().attr("colspan"), "3", "Container3 - Element1: Field 1 (with hCells=3) rendered over 3 grid cells");
			assert.equal(jQuery("#C3E1_T2").parent().attr("colspan"), "2", "Container3 - Element1: Field 2 (with hCells=auto) rendered over 2 grid cells");
			assert.equal(jQuery("#C3E2_L1").parent().attr("colspan"), "8", "Container3 - Element2: Label (with hCells=full) rendered over 8 grid cells");
			assert.equal(jQuery("#C3E2_T1").parent().attr("colspan"), "8", "Container3 - Element2: Field 1 (with hCells=full) rendered over 8 grid cells");

			assert.equal(jQuery("#C5E1_T1").parent().attr("rowspan"), "2", "Container5 - Element1: Field 1 (with vCells=2, hCells=full) rendered with rowspan 2");
			assert.equal(jQuery("#C5E1_T1").parent().prev().prev().children().first().attr("id"), "C4E2_T1", "Container4 -Element2: rendered beside full size field");
			assert.equal(jQuery("#C5E1_T1").parent().parent().next().children().first().next().children().first().attr("id"), "C4E3_T1", "Container4 -Element3: rendered beside full size field in second row");
			assert.equal(jQuery("#C5E1_T1").parent().parent().next().children().length, 3, "Container5 - Element1: no cell used in second row of full size field with vCells=2");
			assert.equal(jQuery("#C4E4_T1").parent().attr("rowspan"), "2", "Container4 - Element4: Field 1 (with vCells=2, hCells=5) rendered with rowspan 2");
			assert.equal(jQuery("#C4E4_T1").parent().next().next().next().children().first().attr("id"), "C5E2_T1", "Container5 -Element2: rendered beside full size field");
			assert.equal(jQuery("#C4E4_T1").parent().parent().next().children().length, 3, "Container5 - Element3: dummy cell rendered for dummy element");
			assert.equal(jQuery("#C4E5_T1").parent().attr("rowspan"), "2", "Container4 - Element5: Field 1 (with vCells=2, hCells=2) rendered with rowspan 2");
			assert.equal(jQuery("#C4E5_T1").parent().parent().next().children().length, 4, "Container4 - Element6: dummy cell rendered for dummy element");
			assert.equal(jQuery("#C4E5_T1").parent().parent().next().next().children().first().next().children().first().attr("id"), "C4E7_T1", "Container5 -Element7: rendered in new line");

			assert.equal(jQuery("#C6E1_I1").parent().attr("colspan"), "2", "Container6 - Element1: Field 1 (with hCells=2) rendered over 2 grid cells");
			assert.ok((jQuery("#C6E1_I1").parent().next().next().next().is("td") && jQuery("#C6E1_I1").parent().next().next().next().attr("colspan") == "8" && jQuery("#C6E1_I1").parent().next().next().next().children().length == 0), "Container6 - empty dummy cell rendered beside (because no second half-size container in row)");
			assert.ok(jQuery("#C6E1_I1").get(0).style.width != "100%", "Container6 - Element1: Image not rendered width = 100%");

			assert.ok(!jQuery.sap.domById("C6E3_T1"), "Content of invisible Element is not rendered");
		});

		QUnit.module("Interaction");

		QUnit.test("Container expander", function(assert) {
			//expander function
			var oContainer = sap.ui.getCore().byId("C3");
			qutils.triggerMouseEvent("C3--Exp", "click");
			sap.ui.getCore().applyChanges();
			assert.ok(!jQuery.sap.domById("C3E1_T1"), "Container3 content area is not visible after click on expander");
			assert.ok((jQuery("#C2E1_T1").parent().next().next().is("td") && jQuery("#C2E1_T1").parent().next().next().attr("colspan") == "8" && jQuery("#C2E1_T1").parent().next().next().children().length == 0), "Container3 - empty dummy cell rendered");
			assert.ok(!(jQuery("#C2E1_L1").parent().parent().next().children().first().is("td") && jQuery("#C2E1_L1").parent().parent().next().children().first().attr("colspan") == "8" && jQuery("#C2E1_L1").parent().parent().next().children().first().children().length == 0), "Container2 - NO empty dummy cell rendered");
			assert.equal(oContainer.getExpanded(), false, "Container3 getExpanded()")
		});

		QUnit.test("change LayoutData", function(assert) {
			var oControl = sap.ui.getCore().byId("F3C3E2_T1");
			assert.ok(!oControl.getLayoutData(), "Field initial has no LayoutData");
			assert.equal(jQuery("#F3C3E2_T1").parent().attr("colspan"), "8", "Field initial without LayoutData - colspan 8");
			var oLayoutData = new sap.ui.commons.form.GridElementData({hCells: "3"});
			oControl.setLayoutData(oLayoutData);
			sap.ui.getCore().applyChanges();
			assert.equal(jQuery("#F3C3E2_T1").parent().attr("colspan"), "3", "Field after setting LayoutData - colspan 3");
			oLayoutData.setHCells("4");
			sap.ui.getCore().applyChanges();
			assert.equal(jQuery("#F3C3E2_T1").parent().attr("colspan"), "4", "Field after changing LayoutData - colspan 4");
			oControl.setLayoutData(null);
			sap.ui.getCore().applyChanges();
			assert.equal(jQuery("#F3C3E2_T1").parent().attr("colspan"), "8", "Field after deleting LayoutData - colspan 8");
			oLayoutData = new sap.ui.core.VariantLayoutData({
				multipleLayoutData: [new sap.ui.commons.form.GridContainerData(), // just to test mutlipe layout data
				                     new sap.ui.commons.form.GridElementData({hCells: "3"})]});
			oControl.setLayoutData(oLayoutData);
			sap.ui.getCore().applyChanges();
			assert.equal(jQuery("#F3C3E2_T1").parent().attr("colspan"), "3", "Field after setting multiple LayoutData - colspan 3");
			oControl.setLayoutData(null);
			sap.ui.getCore().applyChanges();
			assert.equal(jQuery("#F3C3E2_T1").parent().attr("colspan"), "8", "Field after deleting multiple LayoutData - colspan 8");
		});

		QUnit.test("Keyboard Navigation", function(assert) {
			jQuery.sap.byId("C1E1_T1").focus();
			assert.equal(jQuery.sap.byId("C1E1_T1").is(":focus"), true, "Mouseclick: Container 1, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E1_T1", "ARROW_DOWN");
			assert.equal(jQuery.sap.byId("C1E2_T1").is(":focus"), true, "Arrow Down: Container 1, Element 2, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E2_T1", "ARROW_RIGHT");
			assert.equal(jQuery.sap.byId("C1E2_T2").is(":focus"), true, "Arrow Right: Container 1, Element 2, Field 2 - Selected");
			qutils.triggerKeyboardEvent("C1E2_T2", "ARROW_DOWN");
			assert.equal(jQuery.sap.byId("C1E3_T2").is(":focus"), true, "Arrow Down: Container 1, Element 3, Field 2 - Selected");
			qutils.triggerKeyboardEvent("C1E3_T2", "ARROW_RIGHT");
			assert.equal(jQuery.sap.byId("C1E3_T3").is(":focus"), true, "Arrow Right: Container 1, Element 3, Field 3 - Selected");
			qutils.triggerKeyboardEvent("C1E3_T3", "ARROW_UP");
			assert.equal(jQuery.sap.byId("C1E2_T2").is(":focus"), true, "Arrow Up: Container 1, Element 2, Field 2 - Selected");
			qutils.triggerKeyboardEvent("C1E2_T2", "ARROW_LEFT");
			assert.equal(jQuery.sap.byId("C1E2_T1").is(":focus"), true, "Arrow Left: Container 1, Element 2, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E2_T1", "F6");
			assert.equal(jQuery.sap.byId("C2E1_T1").is(":focus"), true, "F6: Container 2, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C2E1_T1", "F6", true, false, false);
			assert.equal(jQuery.sap.byId("C1E1_T1").is(":focus"), true, "Shift + F6: Container 1, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E1_T1", "END", false, false, true);
			assert.equal(jQuery.sap.byId("C7E6_T1").is(":focus"), true, "Ctrl + End: Container 7, Element 6, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C7E6_T1", "HOME");
			assert.equal(jQuery.sap.byId("C7E1_T1").is(":focus"), true, "HOME: Container 7, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C7E1_T1", "F6");
			assert.equal(jQuery.sap.byId("C1E1_T1").is(":focus"), false, "F6: Container 1, Element 1, Field 1 - NOT Selected (No cycling!)");
			jQuery.sap.byId("C1E1_T1").focus();
			qutils.triggerKeyboardEvent("C1E1_T1", "F6");
			assert.equal(jQuery.sap.byId("C2E1_T1").is(":focus"), true, "F6: Container 2, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C2E1_T1", "ARROW_RIGHT");
			assert.equal(jQuery.sap.byId("C4E1_T1").is(":focus"), true, "Arrow Right: Container 4, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C4E1_T1", "ARROW_LEFT");
			assert.equal(jQuery.sap.byId("C2E1_T1").is(":focus"), true, "Arrow Left: Container 2, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C2E1_T1", "HOME", false, false, true);
			assert.equal(jQuery.sap.byId("C1E1_T1").is(":focus"), true, "Ctrl + Home: Container 1, Element 1, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E1_T1", "END");
			assert.equal(jQuery.sap.byId("C1E19_T1").is(":focus"), true, "END: Container 1, Element 19, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E19_T1", "HOME");
			qutils.triggerKeyboardEvent("C1E1_T1", "ARROW_DOWN");
			qutils.triggerKeyboardEvent("C1E2_T1", "ARROW_DOWN");
			qutils.triggerKeyboardEvent("C1E3_T1", "ARROW_DOWN");
			qutils.triggerKeyboardEvent("C1E4_T1", "ARROW_DOWN");
			qutils.triggerKeyboardEvent("C1E5_T1", "ARROW_DOWN");
			assert.equal(jQuery.sap.byId("C1E6_T1").is(":focus"), true, "Home + 5 times Arrow Down: Container 1, Element 6, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E6_T1", "ARROW_RIGHT");
			assert.equal(jQuery.sap.byId("C1E6_T3").is(":focus"), true, "Arrow Right: Container 1, Element 6, Field 3 - Selected");
			qutils.triggerKeyboardEvent("C1E6_T3", "ARROW_RIGHT");
			assert.equal(jQuery.sap.byId("C1E7_T1").is(":focus"), true, "Arrow Right: Container 1, Element 7, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E7_T1", "ARROW_RIGHT");
			assert.equal(jQuery.sap.byId("C1E7_T2").is(":focus"), true, "Arrow Right: Container 1, Element 7, Field 2 - Selected");
			qutils.triggerKeyboardEvent("C1E7_T2", "ARROW_RIGHT");
			assert.equal(jQuery.sap.byId("C1E7_T3").is(":focus"), true, "Arrow Right: Container 1, Element 7, Field 3 - Selected");
			qutils.triggerKeyboardEvent("C1E7_T3", "ARROW_LEFT");
			assert.equal(jQuery.sap.byId("C1E7_T2").is(":focus"), true, "Arrow Left: Container 1, Element 7, Field 2 - Selected");
			qutils.triggerKeyboardEvent("C1E7_T2", "ARROW_LEFT");
			assert.equal(jQuery.sap.byId("C1E7_T1").is(":focus"), true, "Arrow Left: Container 1, Element 7, Field 1 - Selected");
			qutils.triggerKeyboardEvent("C1E7_T1", "ARROW_LEFT");
			assert.equal(jQuery.sap.byId("C1E6_T3").is(":focus"), true, "Arrow Left: Container 1, Element 6, Field 3 - Selected");
			qutils.triggerKeyboardEvent("C1E6_T3", "ARROW_LEFT");
			assert.equal(jQuery.sap.byId("C1E6_T1").is(":focus"), true, "Arrow Left: Container 1, Element 6, Field 1 - Selected");
		});

		QUnit.module("Error handling");

		QUnit.test("too much fields", function(assert) {
			var aLogEntries = jQuery.sap.log.getLogEntries();
			var findLogEntry = function(sMessage, iLevel){
				for( var i=0; i < aLogEntries.length;i++){
					var oLogEntry = aLogEntries[i];
					if(sMessage == oLogEntry.message && iLevel == oLogEntry.level){
						return true;
					}
				}
				return false;
			}
			assert.ok(jQuery.sap.domById("C7E1_T1"), "Element1: TextField1 is rendered");
			assert.ok(!jQuery.sap.domById("C7E1_T2"), "Element1: TextField2 is not rendered");
			assert.ok(findLogEntry('Element "C7E1" - Too much fields for one row!',1),"Error entry in log found for Element1");

			var bOK = true;
			for( var i=1; i <= 13;i++){
				if( !jQuery.sap.domById("C7E2_T"+i) ) {
					bOK = false;
				}
			}
			assert.ok(bOK, "Element2: TextFields 1-13 are rendered");
			bOK = true;
			for( var i=14; i <= 15;i++){
				if( jQuery.sap.domById("C7E2_T"+i) ) {
					bOK = false;
				}
			}
			assert.ok(bOK, "Element2: TextFields 14-15 are not rendered");
			assert.ok(findLogEntry('Element "C7E2" - Too much fields for one row!',1),"Error entry in log found for Element2");

			assert.ok(jQuery.sap.domById("C7E3_T1"), "Element3: TextField1 is rendered");
			assert.ok(jQuery.sap.domById("C7E3_T2"), "Element3: TextField2 is rendered");
			assert.ok(!jQuery.sap.domById("C7E3_T3"), "Element3: TextField3 is not rendered");
			assert.ok(findLogEntry('Element "C7E3" - Too much fields for one row!',1),"Error entry in log found for Element3");

			assert.ok(jQuery.sap.domById("C7E4_T1"), "Element4: TextField1 is rendered");
			assert.equal(jQuery("#C7E4_T1").parent().attr("rowspan"), "2", "Element4: Field 1 (with vCells=2) rendered with rowspan 2");
			assert.ok(!jQuery.sap.domById("C7E5_T1"), "Element5: TextField1 (full size) is not rendered");
			assert.ok(findLogEntry('Element "C7E5" - Too much fields for one row!',1),"Error entry in log found for Element5");
		});

		QUnit.test("More hCells than Elements", function(assert) {
			assert.equal(jQuery("#C6E2_T1").parent().attr("rowspan"), "3", "Container6 - Element2: Field 1 (with vCells=2, hCells=3) rendered with rowspan 3");
			assert.equal(jQuery("#C6E2_T1").parent().parent().next().children().length, 0, "Container6 - Element2: first dummy row to fill up rowspan");
			assert.equal(jQuery("#C6E2_T1").parent().parent().next().next().children().length, 0, "Container6 - Element2: second dummy row to fill up rowspan");

			assert.equal(jQuery("#C7E6_T1").parent().attr("rowspan"), "3", "Container7 - Element6: Field 1 (with vCells=2, hCells=3) rendered with rowspan 3");
			assert.equal(jQuery("#C7E6_T1").parent().parent().next().children().length, 0, "Container7 - Element6: first dummy row to fill up rowspan");
			assert.equal(jQuery("#C7E6_T1").parent().parent().next().next().children().length, 0, "Container7 - Element6: second dummy row to fill up rowspan");
		});

		</script>

	<title>QUnit Test for GridLayout</title>
	<link rel="shortcut icon" type="image/x-icon" href="../images/controls/sap.ui.commons.form.GridLayout.gif">

</head>
<body class="sapUiBody">
	<h1 id="qunit-header">QUnit tests: sap.ui.commons.form.GridLayout</h1>
	<h2 id="qunit-banner"></h2>
	<h2 id="qunit-userAgent"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<ol id="qunit-tests"></ol>
	<br>
	<div id="uiArea1"></div>
	<br>
	<div id="uiArea2"></div>
	<br>
	<div id="uiArea3"></div>

</body>
</html>


text:
#!/bin/bash -eu

# Resolve dependencies and download plugins given on the command line
#
# FROM jenkins
# RUN install-plugins.sh docker-slaves github-branch-source

set -o pipefail

REF_DIR=${REF:-/usr/share/jenkins/ref/plugins}
FAILED="$REF_DIR/failed-plugins.txt"

. /usr/local/bin/jenkins-support

getLockFile() {
    printf '%s' "$REF_DIR/${1}.lock"
}

getArchiveFilename() {
    printf '%s' "$REF_DIR/${1}.jpi"
}

download() {
    local plugin originalPlugin version lock ignoreLockFile
    plugin="$1"
    version="${2:-latest}"
    ignoreLockFile="${3:-}"
    lock="$(getLockFile "$plugin")"

    if [[ $ignoreLockFile ]] || mkdir "$lock" &>/dev/null; then
        if ! doDownload "$plugin" "$version"; then
            # some plugin don't follow the rules about artifact ID
            # typically: docker-plugin
            originalPlugin="$plugin"
            plugin="${plugin}-plugin"
            if ! doDownload "$plugin" "$version"; then
                echo "Failed to download plugin: $originalPlugin or $plugin" >&2
                echo "Not downloaded: ${originalPlugin}" >> "$FAILED"
                return 1
            fi
        fi

        if ! checkIntegrity "$plugin"; then
            echo "Downloaded file is not a valid ZIP: $(getArchiveFilename "$plugin")" >&2
            echo "Download integrity: ${plugin}" >> "$FAILED"
            return 1
        fi

        resolveDependencies "$plugin"
    fi
}

doDownload() {
    local plugin version url jpi
    plugin="$1"
    version="$2"
    jpi="$(getArchiveFilename "$plugin")"

    # If plugin already exists and is the same version do not download
    if test -f "$jpi" && unzip -p "$jpi" META-INF/MANIFEST.MF | tr -d '\r' | grep "^Plugin-Version: ${version}$" > /dev/null; then
        echo "Using provided plugin: $plugin"
        return 0
    fi

    if [[ "$version" == "latest" && -n "$JENKINS_UC_LATEST" ]]; then
        # If version-specific Update Center is available, which is the case for LTS versions,
        # use it to resolve latest versions.
        url="$JENKINS_UC_LATEST/latest/${plugin}.hpi"
    elif [[ "$version" == "experimental" && -n "$JENKINS_UC_EXPERIMENTAL" ]]; then
        # Download from the experimental update center
        url="$JENKINS_UC_EXPERIMENTAL/latest/${plugin}.hpi"
    elif [[ "$version" == incrementals* ]] ; then
        # Download from Incrementals repo: https://jenkins.io/blog/2018/05/15/incremental-deployment/
        # Example URL: https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/workflow/workflow-support/2.19-rc289.d09828a05a74/workflow-support-2.19-rc289.d09828a05a74.hpi
        local groupId incrementalsVersion
        arrIN=("${version//;/ }")
        groupId=${arrIN[1]}
        incrementalsVersion=${arrIN[2]}
        url="${JENKINS_INCREMENTALS_REPO_MIRROR}/$(echo "${groupId}" | tr '.' '/')/${plugin}/${incrementalsVersion}/${plugin}-${incrementalsVersion}.hpi"
    else
        JENKINS_UC_DOWNLOAD=${JENKINS_UC_DOWNLOAD:-"$JENKINS_UC/download"}
        url="$JENKINS_UC_DOWNLOAD/plugins/$plugin/$version/${plugin}.hpi"
    fi

    echo "Downloading plugin: $plugin from $url"
    retry_command curl "${CURL_OPTIONS:--sSfL}" --connect-timeout "${CURL_CONNECTION_TIMEOUT:-20}" --retry "${CURL_RETRY:-5}" --retry-delay "${CURL_RETRY_DELAY:-0}" --retry-max-time "${CURL_RETRY_MAX_TIME:-60}" "$url" -o "$jpi"
    return $?
}

checkIntegrity() {
    local plugin jpi
    plugin="$1"
    jpi="$(getArchiveFilename "$plugin")"

    unzip -t -qq "$jpi" >/dev/null
    return $?
}

resolveDependencies() {
    local plugin jpi dependencies
    plugin="$1"
    jpi="$(getArchiveFilename "$plugin")"

    dependencies="$(unzip -p "$jpi" META-INF/MANIFEST.MF | tr -d '\r' | tr '\n' '|' | sed -e 's#| ##g' | tr '|' '\n' | grep "^Plugin-Dependencies: " | sed -e 's#^Plugin-Dependencies: ##')"

    if [[ ! $dependencies ]]; then
        echo " > $plugin has no dependencies"
        return
    fi

    echo " > $plugin depends on $dependencies"

    IFS=',' read -r -a array <<< "$dependencies"

    for d in "${array[@]}"
    do
        plugin="$(cut -d':' -f1 - <<< "$d")"
        if [[ $d == *"resolution:=optional"* ]]; then
            echo "Skipping optional dependency $plugin"
        else
            local pluginInstalled
            if pluginInstalled="$(echo -e "${bundledPlugins}\n${installedPlugins}" | grep "^${plugin}:")"; then
                pluginInstalled="${pluginInstalled//[$'\r']}"
                local versionInstalled; versionInstalled=$(versionFromPlugin "${pluginInstalled}")
                local minVersion; minVersion=$(versionFromPlugin "${d}")
                if versionLT "${versionInstalled}" "${minVersion}"; then
                    echo "Upgrading bundled dependency $d ($minVersion > $versionInstalled)"
                    download "$plugin" &
                else
                    echo "Skipping already installed dependency $d ($minVersion <= $versionInstalled)"
                fi
            else
                download "$plugin" &
            fi
        fi
    done
    wait
}

bundledPlugins() {
    local JENKINS_WAR=/usr/share/jenkins/jenkins.war
    if [ -f $JENKINS_WAR ]
    then
        TEMP_PLUGIN_DIR=/tmp/plugintemp.$$
        for i in $(jar tf $JENKINS_WAR | grep -E '[^detached-]plugins.*\..pi' | sort)
        do
            rm -fr $TEMP_PLUGIN_DIR
            mkdir -p $TEMP_PLUGIN_DIR
            PLUGIN=$(basename "$i"|cut -f1 -d'.')
            (cd $TEMP_PLUGIN_DIR;jar xf "$JENKINS_WAR" "$i";jar xvf "$TEMP_PLUGIN_DIR/$i" META-INF/MANIFEST.MF >/dev/null 2>&1)
            VER=$(grep -E -i Plugin-Version "$TEMP_PLUGIN_DIR/META-INF/MANIFEST.MF"|cut -d: -f2|sed 's/ //')
            echo "$PLUGIN:$VER"
        done
        rm -fr $TEMP_PLUGIN_DIR
    else
        rm -f "$TEMP_ALREADY_INSTALLED"
        echo "ERROR file not found: $JENKINS_WAR"
        exit 1
    fi
}

versionFromPlugin() {
    local plugin=$1
    if [[ $plugin =~ .*:.* ]]; then
        echo "${plugin##*:}"
    else
        echo "latest"
    fi

}

installedPlugins() {
    for f in "$REF_DIR"/*.jpi; do
        echo "$(basename "$f" | sed -e 's/\.jpi//'):$(get_plugin_version "$f")"
    done
}

jenkinsMajorMinorVersion() {
    local JENKINS_WAR
    JENKINS_WAR=/usr/share/jenkins/jenkins.war
    if [[ -f "$JENKINS_WAR" ]]; then
        local version major minor
        version="$(java -jar $JENKINS_WAR --version)"
        major="$(echo "$version" | cut -d '.' -f 1)"
        minor="$(echo "$version" | cut -d '.' -f 2)"
        echo "$major.$minor"
    else
        echo "ERROR file not found: $JENKINS_WAR"
        return 1
    fi
}

main() {
    local plugin pluginVersion jenkinsVersion
    local plugins=()

    mkdir -p "$REF_DIR" || exit 1
    rm -f "$FAILED"

    # Read plugins from stdin or from the command line arguments
    if [[ ($# -eq 0) ]]; then
        while read -r line || [ "$line" != "" ]; do
            # Remove leading/trailing spaces, comments, and empty lines
            plugin=$(echo "${line}" | tr -d '\r' | sed -e 's/^[ \t]*//g' -e 's/[ \t]*$//g' -e 's/[ \t]*#.*$//g' -e '/^[ \t]*$/d')

            # Avoid adding empty plugin into array
            if [ ${#plugin} -ne 0 ]; then
                plugins+=("${plugin}")
            fi
        done
    else
        plugins=("$@")
    fi

    # Create lockfile manually before first run to make sure any explicit version set is used.
    echo "Creating initial locks..."
    for plugin in "${plugins[@]}"; do
        mkdir "$(getLockFile "${plugin%%:*}")"
    done

    echo "Analyzing war..."
    bundledPlugins="$(bundledPlugins)"

    echo "Registering preinstalled plugins..."
    installedPlugins="$(installedPlugins)"

    # Check if there's a version-specific update center, which is the case for LTS versions
    jenkinsVersion="$(jenkinsMajorMinorVersion)"
    if curl -fsL -o /dev/null "$JENKINS_UC/$jenkinsVersion"; then
        JENKINS_UC_LATEST="$JENKINS_UC/$jenkinsVersion"
        echo "Using version-specific update center: $JENKINS_UC_LATEST..."
    else
        JENKINS_UC_LATEST=
    fi

    echo "Downloading plugins..."
    for plugin in "${plugins[@]}"; do
        pluginVersion=""

        if [[ $plugin =~ .*:.* ]]; then
            pluginVersion=$(versionFromPlugin "${plugin}")
            plugin="${plugin%%:*}"
        fi

        download "$plugin" "$pluginVersion" "true" &
    done
    wait

    echo
    echo "WAR bundled plugins:"
    echo "${bundledPlugins}"
    echo
    echo "Installed plugins:"
    installedPlugins

    if [[ -f $FAILED ]]; then
        echo "Some plugins failed to download!" "$(<"$FAILED")" >&2
        exit 1
    fi

    echo "Cleaning up locks"
    rm -r "$REF_DIR"/*.lock
}

main "$@"


text:
//This file is automatically rebuilt by the Cesium build process.
/*global define*/
define(function() {
    'use strict';
    return "attribute vec3 position3DHigh;\n\
attribute vec3 position3DLow;\n\
attribute vec3 prevPosition3DHigh;\n\
attribute vec3 prevPosition3DLow;\n\
attribute vec3 nextPosition3DHigh;\n\
attribute vec3 nextPosition3DLow;\n\
attribute vec2 expandAndWidth;\n\
attribute vec4 color;\n\
attribute float batchId;\n\
\n\
varying vec4 v_color;\n\
\n\
void main()\n\
{\n\
    float expandDir = expandAndWidth.x;\n\
    float width = abs(expandAndWidth.y) + 0.5;\n\
    bool usePrev = expandAndWidth.y < 0.0;\n\
\n\
    vec4 p = czm_computePosition();\n\
    vec4 prev = czm_computePrevPosition();\n\
    vec4 next = czm_computeNextPosition();\n\
\n\
    v_color = color;\n\
\n\
    float angle;\n\
    vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n\
    gl_Position = czm_viewportOrthographic * positionWC;\n\
}\n\
";
});


text:
class CreateSuites < ActiveRecord::Migration
  def change
    create_table :suites do |t|
      t.string :suite_number, null: false
      t.integer :game_id, null: false

      t.timestamps null: false
    end
  end
end


text:
local typing = {
["статическая типизация"] = "типы переменных постоянны",
["динамическая типизация"] = "типы переменных могут меняться",
["сильная (строгая) типизация"] =
    "неявные преобразования типов запрещены",
["слабая (нестрогая) типизация"] =
    "неявные преобразования типов разрешены",
["явная типизация"] = "тип переменной пишет программист",
["неявная типизация"] =
    "тип переменной выводится автоматически",
}

local helpers = require 'quiz.helpers'

return helpers.testDefinitions(typing)


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

 -->

<resources xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="service_name" msgid="4841491635055379553">"Багц хандалтын тусламж"</string>
</resources>


text:
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _

from resume.models import (
    WorkExperienceTranslation,
    WorkExperience,
    Project,
)

class WorkExperienceTranslationInline(admin.StackedInline):
    model = WorkExperienceTranslation
    extra = 1

class WorkExperienceAdmin(admin.ModelAdmin):
    inlines = [
        WorkExperienceTranslationInline
    ]

    list_display = ('show_user_info', 'show_position', 'show_location')

    def show_user_info(self, obj):
        from itertools import chain
        user_info = [obj.user.user.username]
        try:
            if obj.company:
                user_info.append(obj.company)
            return '-'.join(user_info)
        except KeyError:
            return '{}\' work_experience'.format(obj.user.user.username)
    show_user_info.short_description = _('User Info')

    def show_position(self, obj):
        return obj.position
    show_position.short_description = _('Job Position')

    def show_location(self, obj):
        return obj.location
    show_location.short_description = _('Location')

class ProjectAdmin(admin.ModelAdmin):
    pass

admin.site.register(WorkExperience, WorkExperienceAdmin)
admin.site.register(Project, ProjectAdmin)


text:
Everything is controlled by the Bene Gesserit behind the scenes. In tech terms, this is the rules engine.

## TODO
JBoss BRMS which will fire events/control house-atreides


text:
echo "Install development tools"
yum groupinstall -y "Development Tools"


text:
package de.oliver_heger.linedj.radio

/**
  * An action task class for starting radio playback.
  *
  * An instance is configured with the current [[RadioController]]. When the
  * task is triggered, it simply delegates to the controller to actually
  * execute the action.
  *
  * @param controller the radio controller
  */
class StartPlaybackTask(controller: RadioController) extends Runnable {
  override def run(): Unit = {
    controller.startPlayback()
  }
}


text:
#import "SimpleDBSelectResponseUnmarshaller.h"

@implementation SimpleDBSelectResponseUnmarshaller

-(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
{
    [super parser:parser didStartElement:elementName namespaceURI:namespaceURI qualifiedName:qName attributes:attributeDict];

    if ([elementName isEqualToString:@"Item"]) {
        [parser setDelegate:[[[SimpleDBItemUnmarshaller alloc] initWithCaller:self withParentObject:self.response.items withSetter:@selector(addObject:)] autorelease]];
    }

    if ([elementName isEqualToString:@"Error"]) {
        [parser setDelegate:[[[AmazonServiceExceptionUnmarshaller alloc] initWithCaller:self withParentObject:self.response withSetter:@selector(setException:)] autorelease]];
    }
}

-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
    [super parser:parser didEndElement:elementName namespaceURI:namespaceURI qualifiedName:qName];

    if ([elementName isEqualToString:@"NextToken"]) {
        self.response.nextToken = self.currentText;
        return;
    }

    if ([elementName isEqualToString:@"SelectResult"]) {
        if (caller != nil) {
            [parser setDelegate:caller];
        }

        if (parentObject != nil && [parentObject respondsToSelector:parentSetter]) {
            [parentObject performSelector:parentSetter withObject:self.response];
        }

        return;
    }
}

-(SimpleDBSelectResponse *)response
{
    if (nil == response) {
        response = [[SimpleDBSelectResponse alloc] init];
    }
    return response;
}

-(void)dealloc
{
    [response release];
    [super dealloc];
}

@end


text:
exports.init = function Builder(grunt, options) {
	var methods,
		fs = require('fs'),
		core = require('./core').init(grunt, options),
		templates = require('./templates').init(grunt, options),
		dest,
		html;

	methods = {
		src: '',
		dest: '',
		components: '',
		f: '',
		vars: options.vars,
		init: function(src, f) {
			methods.src = src;
			methods.f = f;
			methods.dest = core.getFilename(src, f.dest);
			methods.components = f.components_src;

			templates.generate(src, f);
		},

		generateComponent: function() {
			var sourceFiles = [];
			grunt.file.recurse(methods.f.components_src, function(abspath, rootdir, subdir, filename) {
				var data = grunt.file.read(abspath, {
					encoding: 'utf-8'
				}),
					jsonPath = filename.match('.html') ? methods.f.components_src + 'data/' + filename.replace('.html', '.json') : null,
					json = jsonPath ? core.loadJSON(jsonPath) : null,
					content;

				data = core.replaceVars(data);

				if (json && json.data && json.data.length > 0) {
					content = templates.replaceContent(data, json.data[0], true);

					if (content) {
						methods.writeComponent(filename, content);
					}
				} else if (filename.match('\.html')) {
					data = core.replaceAssetsPath(data, true);
					methods.writeComponent(filename, data);
				} else {
					methods.copyFile(subdir, filename);
				}

				if (filename.match('\.html')) {
					sourceFiles.push(filename);
				}
			});

			methods.generateIndexSource(sourceFiles);
		},

		writeComponent: function(filename, html) {
			grunt.file.write(methods.f.components_dest + filename, html);
			grunt.log.ok('File "' + methods.f.components_dest + filename + '" created.');
		},

		copyFile: function(subdir, filename) {
			var path = subdir ? methods.f.components_src + subdir + '/' : methods.f.components_src,
				destPath = subdir ? methods.f.components_dest + subdir + '/' : methods.f.components_dest,
				origin = path + filename,
				target = destPath + filename;

			grunt.file.copy(origin, target);

			grunt.log.ok('File "' + origin + '" copy to ' + target + '.');
		},

		clean: function(path) {
			if (grunt.file.exists(path)) {
				grunt.log.ok('Components path removed:  "' + path);
				grunt.file.delete(path, {
					force: true
				});
			}
		},

		generateIndexSource: function(sourceFiles) {
			var i,
				iframes = '';

			for (i = 0; i < sourceFiles.length; i++) {
				iframes += '
';
				iframes += "
";
				iframes += sourceFiles[i];
				iframes += '[open]';
				iframes += "
\n";
				iframes += '';
				iframes += "\n";
				iframes += '
';
			}

			methods.writeIndex(iframes);
		},

		writeIndex: function(html) {
			var template = grunt.file.read(methods.f.components_dest + 'template.html', {
				encoding: 'utf-8'
			}),
				html = template.replace(/]*>((.|[\n\r])*)<\/body>/im, html),
				filepath = methods.f.components_dest + 'index.html';

			grunt.file.write(filepath, html);
			grunt.log.ok('File "' + filepath + '" created.');
		}

	}

	return methods;
};


text:
var challenges;

function loadchal(id) {
    obj = $.grep(challenges['game'], function (e) {
        return e.id == id;
    })[0];

    updateChalWindow(obj);
}

function loadchalbyname(chalname) {
    obj = $.grep(challenges['game'], function (e) {
      return e.name == chalname;
    })[0];

    updateChalWindow(obj);
}

function updateChalWindow(obj) {
    window.location.replace(window.location.href.split('#')[0] + '#' + obj.name);
    var chal = $('#chal-window');
    chal.find('.chal-name').text(obj.name);
    chal.find('.chal-desc').html(marked(obj.description, {'gfm':true, 'breaks':true}));
    chal.find('.chal-files').empty();
    for (var i = 0; i < obj.files.length; i++) {
        filename = obj.files[i].split('/');
        filename = filename[filename.length - 1];
        $('#chal-window').find('.chal-files').append("
"+filename+"
")
    }

    var tags = chal.find('.chal-tags');
    tags.empty();
    var tag = "{0}";
    for (var i = 0; i < obj.tags.length; i++){
        var data = tag.format(obj.tags[i]);
        tags.append($(data));
    }

    chal.find('.chal-value').text(obj.value);
    chal.find('.chal-category').text(obj.category);
    chal.find('#chal-id').val(obj.id);
    var solves = obj.solves == 1 ? " Solve" : " Solves";
    chal.find('.chal-solves').text(obj.solves + solves);
    $('#answer').val("");

    $('pre code').each(function(i, block) {
        hljs.highlightBlock(block);
    });
}

$("#answer-input").keyup(function(event){
    if(event.keyCode == 13){
        $("#submit-key").click();
    }
});

function submitkey(chal, key, nonce) {
    $('#submit-key').addClass("disabled-button");
    $('#submit-key').prop('disabled', true);
    $.post(script_root + "/chal/" + chal, {
        key: key,
        nonce: nonce
    }, function (data) {
        var result = $.parseJSON(JSON.stringify(data));

        var result_message = $('#result-message');
        var result_notification = $('#result-notification');
        var answer_input = $("#answer-input");
        result_notification.removeClass();
        result_message.text(result.message);

        if (result.status == -1){
          window.location="/login"
          return
        }
        else if (result.status == 0){ // Incorrect key
            result_notification.addClass('alert alert-danger alert-dismissable');
            result_notification.slideDown();

            answer_input.removeClass("correct");
            answer_input.addClass("wrong");
            setTimeout(function () {
                answer_input.removeClass("wrong");
            }, 3000);
        }
        else if (result.status == 1){ // Challenge Solved
            result_notification.addClass('alert alert-success alert-dismissable');
            result_notification.slideDown();

            $('.chal-solves').text((parseInt($('.chal-solves').text().split(" ")[0]) + 1 +  " Solves") );

            answer_input.val("");
            answer_input.removeClass("wrong");
            answer_input.addClass("correct");
        }
        else if (result.status == 2){ // Challenge already solved
            result_notification.addClass('alert alert-info alert-dismissable');
            result_notification.slideDown();

            answer_input.addClass("correct");
        }
        else if (result.status == 3){ // Keys per minute too high
            result_notification.addClass('alert alert-warning alert-dismissable');
            result_notification.slideDown();

            answer_input.addClass("too-fast");
            setTimeout(function() {
                answer_input.removeClass("too-fast");
            }, 3000);
        }
        marksolves()
        updatesolves()
        setTimeout(function(){
          $('.alert').slideUp();
          $('#submit-key').removeClass("disabled-button");
          $('#submit-key').prop('disabled', false);
        }, 3000);
    })
}

function marksolves() {
    $.get(script_root + '/solves', function (data) {
        solves = $.parseJSON(JSON.stringify(data));
        for (var i = solves['solves'].length - 1; i >= 0; i--) {
            id = solves['solves'][i].chalid;
            $('button[value="' + id + '"]').removeClass('theme-background');
            $('button[value="' + id + '"]').addClass('solved-challenge');
        };
    });
}

function updatesolves(){
    $.get(script_root + '/chals/solves', function (data) {
      solves = $.parseJSON(JSON.stringify(data));
      chals = Object.keys(solves);

      for (var i = 0; i < chals.length; i++) {
        obj = $.grep(challenges['game'], function (e) {
            return e.name == chals[i];
        })[0]
        obj.solves = solves[chals[i]]
      };

    });
}

function getsolves(id){
  $.get(script_root + '/chal/'+id+'/solves', function (data) {
    var teams = data['teams'];
    var box = $('#chal-solves-names');
    box.empty();
    for (var i = 0; i < teams.length; i++) {
      var id = teams[i].id;
      var name = teams[i].name;
      var date = moment(teams[i].date).local().format('LLL');
      box.append('
{1}	{2}
'.format(id, htmlentities(name), date));
    };
  });
}

function loadchals() {
    $.get(script_root + "/chals", function (data) {
        var categories = [];
        challenges = $.parseJSON(JSON.stringify(data));

        $('#challenges-board').html("");

        for (var i = challenges['game'].length - 1; i >= 0; i--) {
            challenges['game'][i].solves = 0
            if ($.inArray(challenges['game'][i].category, categories) == -1) {
                var category = challenges['game'][i].category;
                categories.push(category);

                var categoryid = category.replace(/ /g,"-").hashCode();
                var categoryrow = $('' +
                    '
'.format(categoryid) +
                        '
' +
                        '
' +
                        '
' +
                            '

' +
                        '
' +
                    '
');
                categoryrow.find(".category-header").append($("
"+ category +"
"));

                $('#challenges-board').append(categoryrow);
            }
        };

        for (var i = 0; i <= challenges['game'].length - 1; i++) {
            var chalinfo = challenges['game'][i];
            var challenge = chalinfo.category.replace(/ /g,"-").hashCode();
            var chalid = chalinfo.name.replace(/ /g,"-").hashCode();
            var catid = chalinfo.category.replace(/ /g,"-").hashCode();
            var chalwrap = $("

".format(chalid));
            var chalbutton = $("<button class='challenge-button trigger theme-background hide-text' value='{0}' data-toggle='modal' data-target='#chal-window'>
".format(chalinfo.id));
            var chalheader = $("
{0}
".format(chalinfo.name));
            var chalscore = $("{0}".format(chalinfo.value));
            chalbutton.append(chalheader);
            chalbutton.append(chalscore);
            chalwrap.append(chalbutton);

            $("#"+ catid +"-row").find(".category-challenges > .chal-row").append(chalwrap);
        };

        updatesolves();
        marksolves();

        if (window.location.hash.length > 0) {
            loadchalbyname(window.location.hash.substring(1));
            $("#chal-window").modal("show");
        }

        $('.challenge-button').click(function (e) {
            loadchal(this.value);
        });
    });
}

$('#submit-key').click(function (e) {
    submitkey($('#chal-id').val(), $('#answer-input').val(), $('#nonce').val())
});

$('.chal-solves').click(function (e) {
    getsolves($('#chal-id').val())
});

$('#chal-window').on('hide.bs.modal', function (event) {
    $("#answer-input").removeClass("wrong");
    $("#answer-input").removeClass("correct");
    $("#incorrect-key").slideUp();
    $("#correct-key").slideUp();
    $("#already-solved").slideUp();
    $("#too-fast").slideUp();
});

// $.distint(array)
// Unique elements in array
$.extend({
    distinct : function(anArray) {
       var result = [];
       $.each(anArray, function(i,v){
           if ($.inArray(v, result) == -1) result.push(v);
       });
       return result;
    }
});

function colorhash (x) {
    color = ""
    for (var i = 20; i <= 60; i+=20){
        x += i
        x *= i
        color += x.toString(16)
    };
    return "#" + color.substring(0, 6)
}

function update(){
    loadchals()
}

$(function() {
    loadchals();
});

$('.nav-tabs a').click(function (e) {
    e.preventDefault()
    $(this).tab('show')
})

$('#chal-window').on('hidden.bs.modal', function() {
    $('.nav-tabs a:first').tab('show');
    history.replaceState('', document.title, window.location.pathname);
});

setInterval(update, 300000);


text:
/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.sun.facelets.tag.ui;

import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;

import com.sun.facelets.Facelet;
import com.sun.facelets.FaceletFactory;
import com.sun.facelets.FaceletTestCase;
import com.sun.facelets.FaceletViewHandler;
import com.sun.facelets.tag.jsf.ComponentSupport;
import com.sun.facelets.util.FastWriter;

public class IncludeParamTestCase extends FaceletTestCase {

    public void testCaching() throws Exception {
        Facelet f = FaceletFactory.getInstance().getFacelet("test1.xml");

        FacesContext faces = FacesContext.getCurrentInstance();

        UIViewRoot root = faces.getViewRoot();

        this.servletRequest.setAttribute("test", "test2.xml");
        f.apply(faces, root);

        FastWriter fw = new FastWriter();
        ResponseWriter rw = faces.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        faces.setResponseWriter(rw);
        root.encodeAll(faces);
        System.out.println(fw);

        ComponentSupport.removeTransient(root);

        this.servletRequest.setAttribute("test", "test3.xml");
        f.apply(faces, root);

        fw = new FastWriter();
        rw = faces.getResponseWriter();
        rw = rw.cloneWithWriter(fw);
        faces.setResponseWriter(rw);
        root.encodeAll(faces);
        System.out.println(fw);
    }

}


text:
[assembly: System.Reflection.AssemblyVersion("7.1.*")]
//[assembly: System.Reflection.AssemblyInformationalVersion("7.1.0.0")]
//[assembly: System.Reflection.AssemblyFileVersion("7.1.0.0")]