summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMike Rennie2013-11-15 11:43:02 (EST)
committer Gerrit Code Review @ Eclipse.org2013-11-15 17:13:46 (EST)
commitec8922a1286a69f256aab04a39b452eafb65096e (patch)
treef40d9207f0bf77106fa2e9e87e739f9bdce39682
parent0bd9f55c12b53e2dc4ef1d501c7fce34bd83cef2 (diff)
downloadorg.eclipse.orion.client-ec8922a1286a69f256aab04a39b452eafb65096e.zip
org.eclipse.orion.client-ec8922a1286a69f256aab04a39b452eafb65096e.tar.gz
org.eclipse.orion.client-ec8922a1286a69f256aab04a39b452eafb65096e.tar.bz2
Bug 421853 - Move the JS content assist plugin into the new JS bundlev20131115-2213refs/changes/42/18442/3
Change-Id: I4a0a787a8ed004c76ce10fb3408488482709b384 Signed-off-by: Mike Rennie <Michael_Rennie@ca.ibm.com>
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/esprimaJsContentAssist.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssist.js)26
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/esprimaVisitor.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaVisitor.js)18
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/browserIndex.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/browserIndex.js)3
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/ecma5Index.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/ecma5Index.js)3
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/nodeIndex.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/nodeIndex.js)3
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/proposalUtils.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/proposalUtils.js)11
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/scriptedLogger.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/scriptedLogger.js)11
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/serializer.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/serializer.js)17
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeEnvironment.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeEnvironment.js)20
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeInference.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeInference.js)29
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeUtils.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeUtils.js)24
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typesFromIndexFile.js (renamed from bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typesFromIndexFile.js)31
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js44
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/defaults.pref1
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html2
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js4
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html2
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js2
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.html20
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.js31
-rw-r--r--modules/orionode/build/customTargets.xml2
-rw-r--r--modules/orionode/lib/orionode.client/defaults.pref1
-rw-r--r--releng/org.eclipse.orion.client.releng/builder/orion.mini.xml1
23 files changed, 122 insertions, 184 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssist.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/esprimaJsContentAssist.js
index 53a8e75..c05e7ca 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssist.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/esprimaJsContentAssist.js
@@ -1,13 +1,10 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012 VMware, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andy Clement (VMware) - initial API and implementation
@@ -16,9 +13,16 @@
******************************************************************************/
/*global define esprima doctrine inferencerPostOp*/
-define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeEnvironment", "plugins/esprima/typeInference", "plugins/esprima/typeUtils", "plugins/esprima/proposalUtils", "plugins/esprima/scriptedLogger", "orion/Deferred", "esprima/esprima"],
- function(mVisitor, typeEnv, typeInf, typeUtils, proposalUtils, scriptedLogger, Deferred) {
-
+define([
+'javascript/esprima/esprimaVisitor',
+'javascript/esprima/typeEnvironment',
+'javascript/esprima/typeInference',
+'javascript/esprima/typeUtils',
+'javascript/esprima/proposalUtils',
+'javascript/esprima/scriptedLogger',
+'orion/Deferred',
+'esprima/esprima'
+], function(mVisitor, typeEnv, typeInf, typeUtils, proposalUtils, scriptedLogger, Deferred, _) {
/**
* Convert an array of parameters into a string and also compute linked editing positions
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaVisitor.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/esprimaVisitor.js
index 5474f13..99da693 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaVisitor.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/esprimaVisitor.js
@@ -1,23 +1,21 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012, 2013 VMware, Inc. and others.
+ * All Rights Reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andrew Eisenberg (VMware) - initial API and implementation
******************************************************************************/
/*global define esprima */
-define(["plugins/esprima/scriptedLogger"], function(scriptedLogger) {
-
-
+define([
+'javascript/esprima/scriptedLogger'
+], function(scriptedLogger) {
return {
-
/**
* parses the contents with options that are appropriate for inferencing
*/
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/browserIndex.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/browserIndex.js
index 4821558..965a15b 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/browserIndex.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/browserIndex.js
@@ -12,7 +12,8 @@
// this file was generated by a script from the model in types.js
/*global define */
-define("plugins/esprima/indexFiles/browserIndex", [], function () {
+define('javascript/esprima/indexFiles/browserIndex', [
+], function () {
return {
"!name": "browser",
"!define": {
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/ecma5Index.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/ecma5Index.js
index 6eddf11..f38c105 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/ecma5Index.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/ecma5Index.js
@@ -12,7 +12,8 @@
// this file was generated by a script from the model in types.js
/*global define */
-define("plugins/esprima/indexFiles/ecma5Index", [], function () {
+define('javascript/esprima/indexFiles/ecma5Index', [
+], function () {
return {
"!name": "ecma5",
"!define": {
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/nodeIndex.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/nodeIndex.js
index 3abc63f..6c64177 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/indexFiles/nodeIndex.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/indexFiles/nodeIndex.js
@@ -10,7 +10,8 @@
* Manu Sridharan (IBM) - Initial API and implementation
******************************************************************************/
/*global define */
-define("plugins/esprima/indexFiles/nodeIndex", [], function () {
+define('javascript/esprima/indexFiles/nodeIndex', [
+], function () {
return {
"console": "Console",
"process": "Process",
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/proposalUtils.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/proposalUtils.js
index cde7d34..b1edd80 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/proposalUtils.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/proposalUtils.js
@@ -1,11 +1,10 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012, 2013 VMware, Inc. and others.
+ * All Rights Reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andy Clement (VMware) - initial API and implementation
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/scriptedLogger.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/scriptedLogger.js
index f09f5c0..1fb5304 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/scriptedLogger.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/scriptedLogger.js
@@ -1,11 +1,10 @@
/*******************************************************************************
* @license
- * Copyright (c) 2013 VMware, Inc. All Rights Reserved.
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2013 VMware, Inc. and others.
+ * All Rights Reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andrew Eisenberg
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/serializer.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/serializer.js
index 6480635..10bf413 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/serializer.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/serializer.js
@@ -1,18 +1,15 @@
/*******************************************************************************
* @license
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Manu Sridharan (IBM) - Initial API and implementation
******************************************************************************/
-
/**
* This module was used to create index file versions of the type specifications
* from types.js. It is currently unused, but kept around in case the code again
@@ -20,7 +17,9 @@
*/
/*global define console */
-define("plugins/esprima/serializer", ["plugins/esprima/typeUtils"], function (typeUtils) {
+define('javascript/esprima/serializer', [
+'javascript/esprima/typeUtils'
+], function (typeUtils) {
/**
* note all the named types referenced by typeObj in the referencedTypes object
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeEnvironment.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeEnvironment.js
index 05341c3..323c6c7 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeEnvironment.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeEnvironment.js
@@ -1,13 +1,10 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012, 2013 VMware, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andy Clement (VMware) - initial API and implementation
@@ -16,8 +13,11 @@
******************************************************************************/
/*global define*/
-define("plugins/esprima/typeEnvironment", ["plugins/esprima/typeUtils", "plugins/esprima/typesFromIndexFile", "orion/Deferred"],
-function(typeUtils, mTypes, Deferred) {
+define('javascript/esprima/typeEnvironment',[
+'javascript/esprima/typeUtils',
+'javascript/esprima/typesFromIndexFile',
+'orion/Deferred'
+], function(typeUtils, mTypes, Deferred) {
/**
* @return boolean true iff the type contains
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeInference.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeInference.js
index a535248..994fce1 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeInference.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeInference.js
@@ -1,13 +1,10 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012, 2013 VMware, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andy Clement (VMware) - initial API and implementation
@@ -16,7 +13,11 @@
******************************************************************************/
/*global define inferencerPostOp */
-define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/esprima/proposalUtils"], function (mVisitor, typeUtils, proposalUtils) {
+define([
+'javascript/esprima/esprimaVisitor',
+'javascript/esprima/typeUtils',
+'javascript/esprima/proposalUtils'
+], function (mVisitor, typeUtils, proposalUtils) {
var RESERVED_WORDS = {
"break" : true, "case" : true, "catch" : true, "continue" : true, "debugger" : true, "default" : true, "delete" : true, "do" : true, "else" : true, "finally" : true,
@@ -27,8 +28,6 @@ define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/
return RESERVED_WORDS[name] === true;
}
-
-
/**
* TODO move this to a central location
* @type {function(obj):Boolean} a safe way of checking for arrays
@@ -40,7 +39,6 @@ define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/
};
}
-
/**
* @param {String} char a string of at least one char14acter
* @return {boolean} true iff uppercase ascii character
@@ -56,7 +54,6 @@ define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/
return charCode >= 65 && charCode <= 90;
}
-
/**
* finds the right-most segment of a dotted MemberExpression
* if it is an identifier, or null otherwise
@@ -108,6 +105,7 @@ define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/
return "";
}
}
+
/**
* add variable names from inside a lint global directive
*/
@@ -222,8 +220,7 @@ define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/
}
return null;
}
-
-
+
/**
* Finds the closest doc comment to this node
* @param {{range:Array.<Number>}} node
@@ -300,7 +297,6 @@ define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/
return paramTypes;
}
-
/**
* This function takes the current AST node and does the first inferencing step for it (the top-down pass).
* @param node the AST node to visit
@@ -1207,7 +1203,6 @@ define(["plugins/esprima/esprimaVisitor", "plugins/esprima/typeUtils", "plugins/
}
}
-
/**
* infers types for an AST root, storing them in an environment object.
*/
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeUtils.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeUtils.js
index 754e293..bc5c7ce 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typeUtils.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typeUtils.js
@@ -1,13 +1,10 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012, 2013 VMware, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andrew Eisenberg (VMware) - initial API and implementation
@@ -20,8 +17,11 @@ other utility functions related to types.
*/
/*jslint es5:true browser:true*/
/*global define doctrine console */
-define(["plugins/esprima/proposalUtils", "plugins/esprima/scriptedLogger", "doctrine/doctrine"],
-function(proposalUtils, scriptedLogger/*, doctrine*/) {
+define([
+'javascript/esprima/proposalUtils',
+'javascript/esprima/scriptedLogger',
+'doctrine/doctrine'
+], function(proposalUtils, scriptedLogger, _doctrine) {
/**
* Doctrine closure compiler style type objects
*/
@@ -40,7 +40,6 @@ function(proposalUtils, scriptedLogger/*, doctrine*/) {
}
}
-
function createNameType(name) {
if (typeof name !== 'string') {
throw new Error('Expected string, but found: ' + JSON.parse(name));
@@ -53,9 +52,6 @@ function(proposalUtils, scriptedLogger/*, doctrine*/) {
var JUST_DOTS_REGEX = /\$\$__JUST_DOTS__\$\$/g;
var UNDEFINED_OR_EMPTY_OBJ = /:undefined|:\{\}/g;
-
-
-
/**
* The Definition class refers to the declaration of an identifier.
* The start and end are locations in the source code.
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typesFromIndexFile.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typesFromIndexFile.js
index 1638346..9a440f5 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/typesFromIndexFile.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/esprima/typesFromIndexFile.js
@@ -1,27 +1,25 @@
/*******************************************************************************
* @license
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Manu Sridharan (IBM) - Initial API and implementation
******************************************************************************/
-
-
/**
* This module contains the code for parsing index files and converting them
* to the type structure expected by esprimaJsContentAssist.js
*/
/*global define require definitionForType doctrine*/
-define("plugins/esprima/typesFromIndexFile", ["orion/Deferred", "plugins/esprima/typeUtils", "doctrine/doctrine"],
- function (Deferred, typeUtils) {
-
+define('javascript/esprima/typesFromIndexFile', [
+'orion/Deferred',
+'javascript/esprima/typeUtils',
+'doctrine/doctrine'
+], function (Deferred, typeUtils, _doctrine) {
/**
* for case where an object has its own hasOwnProperty property
@@ -45,7 +43,6 @@ define("plugins/esprima/typesFromIndexFile", ["orion/Deferred", "plugins/esprima
return charCode >= 65 && charCode <= 90;
}
-
/**
* Global is the type of the global variable. This can
* vary based on what libraries are being used
@@ -62,7 +59,6 @@ define("plugins/esprima/typesFromIndexFile", ["orion/Deferred", "plugins/esprima
this.Global = new Global();
};
-
var typesPrototype = {};
Types.prototype = typesPrototype;
@@ -357,7 +353,6 @@ define("plugins/esprima/typesFromIndexFile", ["orion/Deferred", "plugins/esprima
}
}
-
/**
* for unit testing. given a type object with properties as in an index file,
* and a name for the type, returns an object { def: d, typeInfo: t }, where d
@@ -416,7 +411,7 @@ define("plugins/esprima/typesFromIndexFile", ["orion/Deferred", "plugins/esprima
function init() {
if (!initResult) {
var d = new Deferred();
- require(["plugins/esprima/indexFiles/ecma5Index"], function (ecma5) {
+ require(["javascript/esprima/indexFiles/ecma5Index"], function (ecma5) {
// add information for core libraries directly to Global.prototype
// and Types.prototype
addIndexInfo(ecma5, globalPrototype, typesPrototype);
@@ -487,9 +482,9 @@ define("plugins/esprima/typesFromIndexFile", ["orion/Deferred", "plugins/esprima
globalsAndTypes = { globals: {}, types: {} };
var indexFile;
if (libName === "browser") {
- indexFile = "plugins/esprima/indexFiles/browserIndex";
+ indexFile = "javascript/esprima/indexFiles/browserIndex";
} else if (libName === "node") {
- indexFile = "plugins/esprima/indexFiles/nodeIndex";
+ indexFile = "javascript/esprima/indexFiles/nodeIndex";
} else {
throw "unknown library name " + libName;
}
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js
index c49d639..6746567 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js
@@ -11,13 +11,14 @@
*******************************************************************************/
/*global define esprima*/
define([
- "orion/plugin",
- "javascript/outliner",
- "javascript/occurrences",
- "esprima/esprima",
- "orion/serialize",
- "orion/i18nUtil"
-], function(PluginProvider, Outliner, Occurrences, _, Serialize, i18nUtil) {
+ 'orion/plugin',
+ 'javascript/outliner',
+ 'javascript/occurrences',
+ 'javascript/esprima/esprimaJsContentAssist',
+ 'esprima/esprima',
+ 'orion/serialize',
+ 'orion/i18nUtil'
+], function(PluginProvider, Outliner, Occurrences, EsprimaAssist, _, Serialize, i18nUtil) {
/**
* Plug-in headers
@@ -51,15 +52,15 @@ define([
name: "JSDoc outline",
id: "orion.javascript.outliner.jsdoc"
});
-
+
/**
* Register the raw source-based outline
*/
- provider.registerServiceProvider("orion.edit.outliner", new Outliner.JsOutliner(),
+ /**provider.registerServiceProvider("orion.edit.outliner", new Outliner.JsOutliner(),
{ contentType: ["application/javascript"],
name: "Source outline",
id: "orion.javascript.outliner.source"
- });
+ });*/
/**
* Register the AST provider
@@ -81,20 +82,25 @@ define([
}
}, {
contentType: ["application/javascript"]
- });
-
- var occurrences = new Occurrences.JavaScriptOccurrences();
+ });
/**
* Register the mark occurrences support
*/
- provider.registerService("orion.edit.occurrences", occurrences,
+ provider.registerService("orion.edit.occurrences", new Occurrences.JavaScriptOccurrences(),
{
- name: "Mark JavaScript Occurrences", //$NON-NLS-0$
- id: "markoccurrences.editor", //$NON-NLS-0$
- tooltip: "Mark JavaScript Occurrences", //$NON-NLS-0$
- key: ["M", true, true], // Ctrl+Shift+M //$NON-NLS-0$
contentType: ["application/javascript"] //$NON-NLS-0$
- });
+ });
+
+ /**
+ * Register the content assist support
+ */
+ provider.registerServiceProvider("orion.edit.contentassist", new EsprimaAssist.EsprimaJavaScriptContentAssistProvider(),
+ {
+ contentType: ["application/javascript"],
+ name: "Esprima based JavaScript content assist",
+ id: "orion.edit.contentassist.esprima"
+ });
+
provider.connect();
}); \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/defaults.pref b/bundles/org.eclipse.orion.client.ui/web/defaults.pref
index 74355c3..9f0ae4f 100644
--- a/bundles/org.eclipse.orion.client.ui/web/defaults.pref
+++ b/bundles/org.eclipse.orion.client.ui/web/defaults.pref
@@ -12,7 +12,6 @@
"plugins/taskPlugin.html": true,
"plugins/csslintPlugin.html": true,
"plugins/site/sitePlugin.html": true,
- "plugins/esprima/esprimaJsContentAssistPlugin.html":true,
"plugins/npmPlugin.html": true,
"shell/plugins/shellPagePlugin.html":true,
"search/plugins/searchPagePlugin.html":true,
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html
index cca61ef..95af5c8 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html
@@ -9,7 +9,7 @@
require({
baseUrl: '../..',
paths: {
- "scriptedLogger": "plugins/esprima/scriptedLogger",
+ "scriptedLogger": "javascript/esprima/scriptedLogger",
text: 'requirejs/text',
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady'
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js
index b245616..363c7a7 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js
@@ -16,8 +16,8 @@
/*global define esprima console setTimeout doctrine*/
define([
- "plugins/esprima/esprimaJsContentAssist",
- "plugins/esprima/esprimaVisitor",
+ "javascript/esprima/esprimaJsContentAssist",
+ "javascript/esprima/esprimaVisitor",
"orion/assert",
"esprima/esprima",
"doctrine/doctrine",
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html
index 29c92d7..ea7bcac 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html
@@ -9,7 +9,7 @@
require({
baseUrl: '../..',
paths: {
- "scriptedLogger": "plugins/esprima/scriptedLogger",
+ "scriptedLogger": "javascript/esprima/scriptedLogger",
text: 'requirejs/text',
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady'
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js
index cb36027..f3174c2 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js
@@ -15,7 +15,7 @@
******************************************************************************/
/*global define esprima console setTimeout doctrine*/
-define(["plugins/esprima/typesFromIndexFile", "plugins/esprima/typeEnvironment", "orion/assert"], function(mTypes, typeEnv, assert) {
+define(["javascript/esprima/typesFromIndexFile", "javascript/esprima/typeEnvironment", "orion/assert"], function(mTypes, typeEnv, assert) {
//////////////////////////////////////////////////////////
// helpers
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.html b/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.html
deleted file mode 100644
index 4eb7080..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta name="copyright" content="Copyright (c) VMware Corporation and others 2012.">
- <title>Esprima Content Assist</title>
- <script src="../../requirejs/require.js"></script>
- <script>
- /*global require */
- require({
- baseUrl: '../../'
- });
-
- require(["esprimaJsContentAssistPlugin.js"]);
-</script>
-</head>
-<body>
-<p>Provides content assist for the Javascript editor based on the <a href="http://esprima.org">esprima Javascript parser</a>.</p>
-</body>
-</html>
-
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.js b/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.js
deleted file mode 100644
index 211609a..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/esprima/esprimaJsContentAssistPlugin.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * @license
- * Copyright (c) 2010, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*global define*/
-define([
- 'orion/plugin',
- 'plugins/esprima/esprimaJsContentAssist'
-], function(PluginProvider, esprimaContentAssistPlugin) {
-
- var headers = {
- name: "Orion JavaScript Content Assist",
- version: "1.0",
- description: "This plugin provides content assist for JavaScript using the Esprima JavaScript parser."
- };
- var provider = new PluginProvider(headers);
- provider.registerServiceProvider("orion.edit.contentassist",
- new esprimaContentAssistPlugin.EsprimaJavaScriptContentAssistProvider(), {
- contentType: ["application/javascript"],
- name: "Esprima based JavaScript content assist",
- id: "orion.edit.contentassist.esprima"
- });
- provider.connect();
-}); \ No newline at end of file
diff --git a/modules/orionode/build/customTargets.xml b/modules/orionode/build/customTargets.xml
index 1cd5996..e885f36 100644
--- a/modules/orionode/build/customTargets.xml
+++ b/modules/orionode/build/customTargets.xml
@@ -194,8 +194,6 @@ lastMapTag=${mapsTagTag}
<optimize pageDir="shell" name="shellPage" bundle="org.eclipse.orion.client.ui" />
<optimize pageDir="shell/plugins" name="shellPagePlugin" bundle="org.eclipse.orion.client.ui" />
<!-- <optimize pageDir="plugins/site" name="sitePlugin" bundle="org.eclipse.orion.client.ui" /> -->
- <optimize pageDir="plugins/esprimaAst" name="esprimaAstPlugin" bundle="org.eclipse.orion.client.ui" />
- <optimize pageDir="plugins/esprima" name="esprimaJsContentAssistPlugin" bundle="org.eclipse.orion.client.ui" />
<!-- <optimize pageDir="plugins" name="authenticationPlugin" bundle="org.eclipse.orion.client.ui" /> -->
<optimize pageDir="plugins" name="csslintPlugin" bundle="org.eclipse.orion.client.ui" />
<optimize pageDir="plugins" name="fileClientPlugin" bundle="org.eclipse.orion.client.ui" />
diff --git a/modules/orionode/lib/orionode.client/defaults.pref b/modules/orionode/lib/orionode.client/defaults.pref
index be64c7e..ae31db6 100644
--- a/modules/orionode/lib/orionode.client/defaults.pref
+++ b/modules/orionode/lib/orionode.client/defaults.pref
@@ -6,7 +6,6 @@
"plugins/pageLinksPlugin.html":true,
"plugins/csslintPlugin.html": true,
"javascript/plugins/javascriptPlugin.html":true,
- "plugins/esprima/esprimaJsContentAssistPlugin.html":true,
"shell/plugins/shellPagePlugin.html":true,
"plugins/nodePlugin.html":true,
"search/plugins/searchPagePlugin.html":true,
diff --git a/releng/org.eclipse.orion.client.releng/builder/orion.mini.xml b/releng/org.eclipse.orion.client.releng/builder/orion.mini.xml
index b206f44..2b44892 100644
--- a/releng/org.eclipse.orion.client.releng/builder/orion.mini.xml
+++ b/releng/org.eclipse.orion.client.releng/builder/orion.mini.xml
@@ -174,7 +174,6 @@
<optimize pageDir="shell" name="shellPage" bundle="org.eclipse.orion.client.ui" />
<optimize pageDir="shell/plugins" name="shellPagePlugin" bundle="org.eclipse.orion.client.ui" />
<optimize pageDir="javascript/plugins" name="javascriptPlugin" bundle="org.eclipse.orion.client.javascript" />
- <optimize pageDir="plugins/esprima" name="esprimaJsContentAssistPlugin" bundle="org.eclipse.orion.client.ui" />
<optimize pageDir="plugins/site" name="sitePlugin" bundle="org.eclipse.orion.client.ui" />
<optimize pageDir="plugins" name="authenticationPlugin" bundle="org.eclipse.orion.client.ui" />
<optimize pageDir="plugins" name="csslintPlugin" bundle="org.eclipse.orion.client.ui" />