View console_suggest.js
function getLastPart(input) {
return input.split(".").pop();
}
function getTarget(input) {
var target = window;
var parts = input.split(".");
while (target instanceof Object && parts.length > 1) {
target = target[parts.shift()]
}
View Mock.spec
describe( "Mock examples:", function() {
var version = jasmine.version_ ? jasmine.version_.major : parseInt( jasmine.version, 10 );
var spyName = function( spy ) {
if( version === 1 ) {
return spy.identity;
} else {
return spy.and.identity()
}
View SpeedTest.Java
/*******************************************************************************
* Copyright (c) 2011 EclipseSource and others. All rights reserved.
******************************************************************************/
import org.eclipse.rwt.internal.widgets.JSExecutor;
import org.eclipse.rwt.lifecycle.IEntryPoint;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Display;